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
292
votes
7 answers

HTTP 1.0 vs 1.1

Could somebody give me a brief overview of the differences between HTTP 1.0 and HTTP 1.1? I've spent some time with both of the RFCs, but haven't been able to pull out a lot of difference between them. Wikipedia says this: HTTP/1.1…
Jason Baker
  • 192,085
  • 135
  • 376
  • 510
55
votes
2 answers

What does the HTTP header If-None-Match: * mean?

What does the following HTTP 1.1 header mean? If-None-Match: * I understand it when using a strong or weak ETag or even a list of ETags, but I don't understant it's use when using star (*). Edit: Would be nice to have some pseudocode (PHP code…
AlexV
  • 22,658
  • 18
  • 85
  • 122
42
votes
5 answers

Name for HTTP Request+Response

There's one thing I haven't found in RFC 2616 ("Hypertext Transfer Protocol -- HTTP/1.1") and that's a "canonical" name for a request/response pair. Is there such thing? 4.1 Message Types: 4.1 Message Types HTTP messages consist of requests…
VolkerK
  • 95,432
  • 20
  • 163
  • 226
33
votes
5 answers

Do any browsers support trailers sent in chunked encoding responses?

HTTP/1.1 specifies that a response sent as Transfer-Encoding: chunked can include optional trailers (ie. what would normally be sent as headers, but for whatever reason can't be calculated before the content, so they can be appended to the end), for…
Scott
  • 1,518
  • 1
  • 15
  • 23
28
votes
4 answers

Why is it said that HTTP2 is a binary protocol?

I've just read an article about differences between http1 and http2. The main question that I have is when it says that http2 is a binary protocol but http1 is a textual protocol. Maybe I'm wrong but I know that any data, text or whatever format it…
Christian LSANGOLA
  • 2,947
  • 4
  • 22
  • 36
27
votes
1 answer

HTTP If-None-Match vs. If-Match

I'm currently building up a PHP script that will answer HTTP "304 Not Modified" when required. (See question #2086712 for what I do so far). Currently I answer to the following: If-Modified-Since If-None-Match But I found out that 3 more headers…
AlexV
  • 22,658
  • 18
  • 85
  • 122
19
votes
1 answer

Why is Connection: keep-alive still being specified in http headers (isn't it deprecated)?

According to "HTTP: The Definitive Guide", using Connection: keep-alive to specify a persistent connection is deprecated in HTTP/1.1, since HTTP/1.1 specifies that connections are persistent by default and must be closed manually by sending…
capdigi
  • 203
  • 1
  • 2
  • 5
14
votes
4 answers

Is it possible to use gRPC with HTTP/1.1 in .NET Core?

I have two network services - a gRPC client and gRPC server. Server is written in .NET Core, hence HTTP/2 for gRPC is enforced. Client however is a .NET Framework 4.7.2 web app hosted on IIS 8.5, so it only supports HTTP/1.1. Since it will take some…
GrayCat
  • 1,749
  • 3
  • 19
  • 30
14
votes
2 answers

HTTP 1.1 - Can a client request that transfers not be "chunked"?

Is it possible for a HTTP 1.1 client to set a header value that indicates the responses to requests should not be chunked? Or is the only way to prevent this, is to send a HTTP 1.0 request? I've tried googling around, but all I can find is ways to…
Matt
  • 774
  • 1
  • 10
  • 28
14
votes
1 answer

HTTP pipelining request text example

Below is an example HTTP 1.1 call with a single page requested : GET /jq.js HTTP/1.1 Host: 127.0.0.1 Accept: */* I understand with HTTP Pipelining, multiple requests can be sent without breaking the connection. Can someone post, some text example…
DMin
  • 10,049
  • 10
  • 45
  • 65
14
votes
2 answers

Versioning a RESTful API with both XML and JSON Content-Type

According to this excellent presentation on designing RESTful interfaces, the preferred way to implement versioning is to utilize the Accept-header, using something like: GET /products HTTP/1.1 Host: example.com Accept:…
PatrikAkerstrand
  • 45,315
  • 11
  • 79
  • 94
14
votes
3 answers

Serving HTTP/1.0 responses with Node.JS (unknown content length, chunked transfer encoding)

The Problem I am serving a resource of unknown length via Node.JS. Because of this, the Content-Length header cannot be set. For HTTP 1.1, it is required that chunked encoding is used for resources of this nature. Node.JS knows this and sends my…
Brad
  • 159,648
  • 54
  • 349
  • 530
13
votes
1 answer

How do I find out the version of HTTP in a request using PHP and Apache

I need to determine whether an HTTP request was an HTTP/1.0 or an HTTP/1.1 request in my PHP script, which is running under Apache. Is there a way to query this information?
nohat
  • 7,113
  • 10
  • 40
  • 43
12
votes
2 answers

Supporting HTTP 100 Continue with PHP

I'm working on a PHP webapp that accepts large POSTed file uploads from specific clients and would like to accept or reject these uploads (based on various headers and other factors, not just size) before the file is uploaded by using HTTP/1.1 100…
Jonah Braun
  • 4,155
  • 7
  • 29
  • 31
12
votes
1 answer

HTTP/1.1 response to multiple range

While writing my HTTP/1.1 server, I get stuck dealing multiple ranges request. Section 14.35.1 of RFC 2616 refers some examples but doesn't clarify server behaviour. For instance: GET /some/resource HTTP/1.1 ... Range:…
LS_ᴅᴇᴠ
  • 10,823
  • 1
  • 23
  • 46
1
2 3
13 14