Questions tagged as 'http-headers'

2
answers

What is Connection Keep-alive?

When I check the headers I am sending to a php page, which is installed locally, I always see this Connection: Keep-Alive Example: var_dump(getallheaders()); Output: array (size=7) 'Host' => string '127.0.0.1' (length=9)...
asked by 05.08.2015 / 17:38
2
answers

What is HTTP response splitting?

Reading about HTTP headers I came across a filter function that removed both invalid characters from the header field value and multiple CRLF characters. This second on the pretext of avoiding the HTTP response splitting . By what I und...
asked by 06.07.2017 / 14:37
1
answer

How to send Tokens from the server to the client?

I am creating an API, I use Token Authentication (JWT), I want this token to be valid for, say, 10 minutes, and, at each request, return a new Token, so the user will have access while active , if it is disconnected for a long time (more than 10...
asked by 17.09.2018 / 22:51
2
answers

How to serve a multi-language site in Apache?

I'm developing a website that needs to be available in 3 languages (static content only, to be served by Apache). I would like to make use of the language detection features so that the user already fell into a version compatible with the langua...
asked by 02.06.2016 / 18:34
1
answer

The appropriate type to serve JavaScript is "text / javascript" or "application / x-javascript" or "application / javascript"?

When analyzing the source code of several pages, Javascript headers vary with respect to the mime (English) , but the question remains about which one we should actually use: How do we use HTML to indicate a Javascript block < sup> (En...
asked by 03.12.2014 / 14:45
2
answers

What is, and how does it work, an ETag

I've been making socket requests for my Apache server in order to create a Framework prototype, and for each different file that was accessed, it returned an ETag in the header . What is an ETag serving? How can I find the ETag of a f...
asked by 28.06.2016 / 02:54
2
answers

Angled POST with customized header and CORS

I need to perform a POST request using angular (http.post) and I need to pass my access credentials (I am using basic authentication) to my API (.NET) in my header.    Authorization : Basic dXNlcm5hbWU6cGFzc3dvcmQ = No angular change the...
asked by 26.10.2015 / 18:17
1
answer

What is the difference between x-www-form-urlencoded and form-data? [duplicate]

Is there any relevant difference between content-type x-www-form-urlencoded and form-data ? I always have doubts when I should use one or the other because I do not know if there are any shocking differences.     
asked by 10.12.2015 / 17:43
1
answer

How does the "Referrer Policy" header work?

I was doing some tests using Opera browser (same engine / Chrome engine) and in the HTTP request this is sent: Referrer Policy: no-referrer-when-downgrade For example in http://localhost I get this: Request URL: http://localhost/ R...
asked by 30.03.2017 / 23:39
1
answer

What is the purpose of the "X" at the beginning of some headers names?

There are specific headers in HTTP that have the purpose of passing some information. Such as Content-Type which informs the mime of the content you want to receive or send. We also have Content-Length that determines the size in b...
asked by 10.11.2016 / 17:38