Questions tagged [http-1.1]

HTTP 1.1 is the latest version of the http protocol. It includes more stringent requirements than HTTP/1.0 in order to ensure reliable implementation of its features.

The Hypertext Transfer Protocol () is an application-level protocol for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World-Wide Web global information initiative since 1990.

HTTP/1.0 does not sufficiently take into consideration the effects of hierarchical proxies, caching, the need for persistent connections, or virtual hosts. In addition, the proliferation of incompletely-implemented applications calling themselves "HTTP/1.0" has necessitated a protocol version change in order for two communicating applications to determine each other's true capabilities.

The new version of the protocol (HTTP 1.1) includes more stringent requirements than HTTP/1.0 in order to ensure reliable implementation of its features.

Here are some of the new features introduced with HTTP 1.1:

  • Host field: HTTP 1.1 has a required Host header by spec.
  • Persistent connections: HTTP 1.1 also allows you to have persistent connections which means that you can have more than one request/response on the same HTTP connection.
  • OPTIONS method: HTTP/1.1 introduces the OPTIONS method. An HTTP client can use this method to determine the abilities of the HTTP server. It's mostly used for Cross Origin Resource Sharing in web applications.
  • Caching: HTTP 1.1 expands on the caching support a lot by using something called 'entity tag'. If 2 resources are the same, then they will have the same entity tags.
  • HTTP 1.1 also adds the If-Unmodified-Since, If-Match, If-None-Match conditional headers.
  • 100 Continue status: there is a new return code in HTTP/1.1 100 Continue. This is to prevent a client from sending a large request when that client is not even sure if the server can process the request, or is authorized to process the request. In this case the client sends only the headers, and the server will tell the client 100 Continue, go ahead with the body.
  • Digest authentication and proxy authentication
  • Extra new status codes
  • Chunked transfer encoding
  • Connection header
  • Enhanced compression support

Resources:

207 questions
11
votes
3 answers

What if an HTTP/1.1 client talk to an HTTP/2 only server and what if an HTTP/2 client talk to an HTTP/1.1 only server?

HTTP/2 is definitely the future trend because it is now the standard of HTTP protocol. As we can see in Can I use, 70.15 percent of browsers support the HTTP/2. But HTTP/2 is so new that there are browsers that only support HTTP/1.x and there are…
lifang
  • 1,485
  • 3
  • 16
  • 23
11
votes
1 answer

Unable to turn off chunked transfer encoding in nginx with gzip for static assets served from Node backend

We have a Node/express web app that is serving static assets in addition to normal content, via express.static(). There is an nginx server in front of it that is currently configured to gzip these static asset requests, if the user agent is up for…
kodeninja
  • 339
  • 1
  • 7
  • 23
10
votes
1 answer

Does empty "Expect:" header mean anything?

Many libraries include Expect: 100-continue on all HTTP 1.1 POST and PUT requests by default. I intend to reduce perceived latency by removing 100-continue mechanism on the client side on those requests for which I know the expense of sending data…
Dima Tisnek
  • 11,241
  • 4
  • 68
  • 120
9
votes
1 answer

WebDAV - Request "Show files in folder"?

I want to download all *.txt files from a WebDAV share. Is there a request/methode to get a list of files from this folder? I´m new to WebDAV and at the w3.org WebDAV methode definition I don´t found this…
LaPhi
  • 5,675
  • 21
  • 56
  • 78
9
votes
1 answer

How to prevent keep-alive in a HTTP 1.1 request?

I'm implementing a simple HTTP client. Which header should I add to a HTTP 1.1 request so it won't keep alive?
Gal Hyams
  • 336
  • 1
  • 5
  • 15
8
votes
5 answers

Node Js problems with response.write

When I try to utilize http stream connection for some reason write does not flush until I call response.end() I am taking the code straight from the demo and do not understand what my problem is. When I curl to the server my headers are…
Tegra Detra
  • 24,551
  • 17
  • 53
  • 78
8
votes
1 answer

why between nginx/nginx upstream use http/1.0?

I have 3 server: A(nginx)-->B(nginx)-->C(nodejs), When i access A or B,chrome use http/1.1+keepalive by default. I do not set "proxy_http_version 1.1;" and proxy_set_header Connection ""; But between A and B,NGINX use http/1.0 by default。That is…
monkey
  • 83
  • 1
  • 1
  • 5
8
votes
1 answer

HTTP if-none-match and if-modified-since and 304 clarification in PHP

My question is about how to reply a HTTP 304 "Not Modified" when I receive both if-none-match and if-modified-since from a proxy/client request. From RFC 2616 secttion 14.26 ( http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.26 ): If…
AlexV
  • 22,658
  • 18
  • 85
  • 122
7
votes
1 answer

HTTP/2 & File Download

We provide a file hosting solution. Our client are the end-users, who hit our servers though HTTP 1.1 protocol & download files. These client are basically software systems or CDNs, who download our files using software libraries. No human user…
Purple haze
  • 75
  • 1
  • 6
7
votes
2 answers

file_get_contents() with context to use http/1.1 significantly slow download speeds

Using the code below each image download) file_get_contents() ) takes on average 8-15 seconds..... If I do not use a context on file_get_contents() then image download is less than a second. If I change the $opts to, below then i get same…
dorgan
  • 135
  • 1
  • 10
7
votes
2 answers

PHP: Get HTTP Protocol Version (HTTP/1.1 vs HTTP/2)

Until now my php application assumed HTTP 1.1 everywhere. So I defined all headers like so: header("HTTP/1.1 500 Internal Server Error"); But now my server also supports HTTP 2 and I want to update all header responses with the right HTTP status…
Pascal Klein
  • 23,665
  • 24
  • 82
  • 119
6
votes
2 answers

Does Server-Sent Events Utilise HTTP/2 Pipelining

When using SSE through the HTML5 EventSource object, do the requests utilise the HTTP/2 multiplexing / pipelining features? In particular, will SSE requests in different tabs (re)use the same HTTP/2 connection? I assume so, since SSE is based…
acrophobia
  • 924
  • 7
  • 22
6
votes
1 answer

Can Tomcat accept HTTP 1.1 requests without a Host header?

HTTP 1.1 states: "A client MUST include a Host header field in all HTTP/1.1 request messages" However, the machines I am working on send out this exact POST (containing coordinates), which I do not have access to change: POST /touch…
user1684196
  • 61
  • 1
  • 3
5
votes
1 answer

Why is HTTP status-line different from the request-line

Both HTTP Request-Line and the Status-Line have 3 components : Request-Line= Method SP Request-URI SP HTTP-Version CRLF Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF The Status-Line (the Server response) is fine: it begin…
Nathan Agio
  • 119
  • 1
  • 5
5
votes
1 answer

Python socket HTTP 1.1 CONNECT request without a valid response

Well, I just want to make the following simple program that tries to create an https tunel with www.google.com at port 443. I first tried the following code: import socket def main(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) …
1
2
3
13 14