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
5
votes
1 answer

How does a HTTP 1.1 server respond to a HTTP 1.0 request?

How does HTTP 1.1 server should respond to a HTTP 1.0 request for headers like Pragma : no-cache which are supported in HTTP 1.0 but not in HTTP 1.1
Kumar
  • 1,536
  • 2
  • 23
  • 33
5
votes
1 answer

HTTP2 headers compatibility with older browsers

I heard today that soon the http2 protocol will be implemented in modern browsers. More information: https://en.wikipedia.org/wiki/HTTP/2, I know wikipedia is not the best resource, but it will give a little clue about what is going on. The question…
Jacek Kowalewski
  • 2,761
  • 2
  • 23
  • 36
5
votes
1 answer

New Line definition for HTTP/1.1 headers

I have an embedded system that makes a HTTP POST request, however I know that the headers must have a format. In this case I have this request: POST / HTTP/1.1\n Host: 192.168.1.15\n Connection: close\n Content-Length: 44\n Content-Type:…
788498
  • 147
  • 1
  • 5
  • 14
4
votes
1 answer

What byte range 0- means

What "Range: bytes=0-" header means ? Is the entire file ? I tried sending back 0 bytes and is not working, when I send the entire file it works, but I receive this request more than once in a streaming context, it doesn't look right.
WhyWhyWhy
  • 85
  • 7
4
votes
3 answers

How to received chunked responses in HTTP/1.1 while sending data at the same time to server in Java/Android

We're building and app on which it records the voice of the user in realtime and sends the recorded data to the server through an HTTP request. While the server processes the data in realtime it is also sending back responses in chunked. To put it…
JLT
  • 3,052
  • 9
  • 39
  • 86
4
votes
2 answers

How can I use chunked transfer encoding in Laravel?

Good day. I am wondering if I can use chunked transfer encoding(further CTE) in API response? I have large data in the database and I need to transfer it to the client in one request. I've read a lot about the CTE mechanism, but I could not find how…
Andrii H.
  • 1,682
  • 3
  • 20
  • 40
4
votes
1 answer

Are weight values required in an Accept Header with multiple values?

Per the spec, the HTTP Accept header can have multiple values, like so: Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8 Source My question is this: do Accept headers with multiple values need to have at least one weight?…
teuber789
  • 1,527
  • 16
  • 28
4
votes
2 answers

HTTP/2 behaviors with HTTP and HTTPS

This https://en.wikipedia.org/wiki/HTTP/2#Encryption says HTTP/2 is defined for both HTTP URIs (i.e. without encryption) and for HTTPS URIs (over TLS, where TLS 1.2 or newer is required).[25] but testing on Google I get different results: curl…
Snowcrash
  • 80,579
  • 89
  • 266
  • 376
4
votes
2 answers

Why is curl using HTTP/1.1 rather than HTTP/2 on mac?

According to this https://curl.haxx.se/docs/http2.html Since 7.47.0, the curl tool enables HTTP/2 by default for HTTPS connections. Installing the latest version with homebrew and checking: curl --version curl 7.54.1 (x86_64-apple-darwin15.6.0)…
Snowcrash
  • 80,579
  • 89
  • 266
  • 376
4
votes
2 answers

HTTP/1.1 and HTTP/2 mixed requests

Will all requests processing over HTTP/1.1 if part of content supports HTTP/2? For example, My web server supports only HTTP/1.1, I've made integration with CDN that supports HTTP/2 by default. When I will open a page from my site first…
Sergey Vaskov
  • 43
  • 1
  • 3
4
votes
1 answer

HTTP: Illegal chunked encoding

I have a .NET client-application which uses a third-party library to access a server via http. The library throws the following error: The server committed a protocol violation. Section=ResponseBody Detail=Response chunk format is invalid The…
Hurby
  • 74
  • 1
  • 1
  • 6
4
votes
1 answer

How to maximize bitcoind JSON-RPC performance?

Does anyone have suggestions for optimizing a script that reads the blockchain from JSON-RPC? Is it possible to use HTTP/1.1 keepalive to avoid re-stablishing a TCP connection for each query? Does the JSON-RPC service support concurrency? UPDATE I…
odigity
  • 7,568
  • 4
  • 37
  • 51
4
votes
2 answers

Open source machine readable grammar for HTTP/1.1?

Is there an open source machine-readable grammar for HTTP/1.1 requests and responses? Specifically, i'm looking for a grammar that is accepted by one of the popular parser generators (e.g., ANTLR, CUP, BNFC, ...).
user278559
  • 121
  • 4
4
votes
2 answers

using trailer header with http chunked transfer. How to set cookie using it

Using trailer I am trying to set a cookie after the page streaming has started. the code below tries to set the cookie. It seems to return proper response but the cookie is not getting set in the browser(ff and chrome). var express =…
Golak Sarangi
  • 809
  • 7
  • 22
4
votes
1 answer

Use HTTP/1.1 with SimpleHTTPRequestHandler

When I use HTTP/1.1 with SimpleHTTPRequestHandler, loading a page that pulls in other resources will hang after the second resource. Here is a small reproducer: from SimpleHTTPServer import SimpleHTTPRequestHandler from BaseHTTPServer import…
kanaka
  • 70,845
  • 23
  • 144
  • 140
1 2
3
13 14