PHP header HTTP 1.0 vs 1.1

Possible duplicate:
404 header - HTTP 1.0 or 1.1?

If you use

header( "HTTP/1.0 404 Not Found", true, 404 ); 

instead

 header( "HTTP/1.1 404 Not Found", true, 404 ); 

when does a user agent use HTTP / 1.0? That is, is it good to respond with the same HTTP version?

Btw, I use it to claim that the page does not exist for users who are not currently logged in. I understand that these are different versions and that HTTP / 1.1 has different functions.

+4
source share
2 answers

If you don't want to distinguish between 1.0 and 1.1 and want to send a static header, I think

 header( "HTTP/1.0 404 Not Found", true, 404 ); 

- A safe way to do this is that every client says HTTP / 1.0.

But I also expect no client to check the http version at all in case 404. At least I never experienced problems with the http version ...

0
source

When a user agent says that it uses HTTP 1.0 (as specified in RFC 1945 of May 1996), you should not assume that it understands a protocol that was developed later (for example, HTTP 1.1 as specified in RFC 2616 of June 1999) . So use HTTP 1.0 in the response.

+1
source

All Articles