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
2
votes
0 answers

Can erlang httpc avoid connection reuse when a previous request hasn't yet finished?

I have 2 kinds of requests to access my server: one is slow (30s) and the other is fast (3s). However, the faster one often works too slowly as the result of httpc reusing a connection created by the slower one (HTTP1.1 Keep-Alive). I tried setting…
CenAlpha
  • 21
  • 1
2
votes
1 answer

Is there any way to have curl connect and let me type and send pieces of the body as I type?

I would like to test the streaming part of our website with some command line tool. Is there a way to send an http1.1 request using curl AND then have it go into a mode where as I type, it sends the data to the server keeping the connection open. …
Dean Hiller
  • 19,235
  • 25
  • 129
  • 212
2
votes
0 answers

HTTP 1.1 keep-alive

I have created an application using SpringBoot in backend and AngularJs in frontend. In chrome developer tool I can see in my XHR requests a header like this - Connection: keep-alive I know what keep-alive means in HTTP 1.1, which basically allows…
Saurav Kumar Singh
  • 1,352
  • 7
  • 18
2
votes
1 answer

Does it make any sense for a `HTTP/1.1` response to return HTTP status code `421 Misdirected Request`?

I am currently debugging a surprising "Bad Request" response from an API. Request: POST /path HTTP/1.1 ... Response: HTTP/1.1 421 Misdirected Request Date: Fri, 30 Nov 2018 21:59:12 GMT ... Via: https/1.1 subdomain.example.org…
janpio
  • 10,645
  • 16
  • 64
  • 107
2
votes
0 answers

Is it possible to redirect an HTTP upgrade request to another URL?

When getting a WebSocket upgrade request in Node.js, is it possible to redirect it to another URL?
Kevin Ghadyani
  • 6,829
  • 6
  • 44
  • 62
2
votes
1 answer

REST: correct response status according RFC 2616 HTTP/1.1 spec?

I have skimmed over the HTTP/1.1 protocol spec at RFC-2616 and I am trying to understand which status code should be returned when a particular REST method is invoked. As far as I have studied the protocol (links), I tried to parse REST methods to…
Nikolas Charalambidis
  • 40,893
  • 16
  • 117
  • 183
2
votes
1 answer

Reading gzipped chunked data HTTP 1.1 in Java

I am trying to get body of an HTTP request with gzipped data + chunked encoding. The code I am using: byte[] d; // *whole* request body ByteArrayOutputStream b = new ByteArrayOutputStream(); int c = 0; int p = 0; int s = 0; for(int i = 0; i <…
carobnodrvo
  • 1,021
  • 1
  • 9
  • 32
2
votes
1 answer

Nodejs HTTP/1.1 pipeline support

I'm almost newby to nodejs. I'm working on a small nodejs micro-service and its running well. But as per recent requirement this service need to support HTTP/1.1 pipeline. But I'm failing to find in nodejs doc that how to enable/support that.…
thecodeparadox
  • 86,271
  • 21
  • 138
  • 164
2
votes
2 answers

Why does Wget have Host Header in its HTTP request?

The main difference between HTTP/1.0 and HTTP/1.1 is that HTTP/1.1 has a mandatory Host header in it (source: HTTP Pocket Reference - O'reilly). So, why is that Wget, which uses the HTTP/1.0 protocol, has a host header in it? My output of Wget with…
Shiv Deepak
  • 3,122
  • 5
  • 34
  • 49
2
votes
1 answer

Is it allowed to use the 409 Conflict status code to prevent some fields from being updated in a HTTP PUT request

While working on an (json) REST API, I came upon the situation that we have a representation of a user resource where I wanted to prevent a field (email) to be overridden within a PUT. If I understand correctly, then a PUT should contain the entire…
mhogerheijde
  • 2,659
  • 1
  • 19
  • 24
2
votes
1 answer

How do i send a POST request without Transfer Encoding:chunked from Jersey ReST Client 2.22.2

When i send a POST request through Jersey ReST client it's automatically using Header transfer-encoding: [chunked]. Is there any way to force use of content-length: instead of transfer-encoding.? WebTarget webTarget =…
Rohit
  • 635
  • 6
  • 12
  • 22
2
votes
2 answers

HTTP/1.1 400 Bad Request Sabre REST Api

Currently using a test developer account for Sabre Dev Studio and trying to use their REST Api - Instaflights_Search. I'm creating the authentication and getting an access token fine but the problem arises when I try to send a request. I'm creating…
Sandi B
  • 23
  • 4
2
votes
1 answer

What makes conditional GETs "conditional" if the resource is obtained in the initial request?

Breaking down what makes a conditional GET: In RFC 2616 it states that the GET method change to a "conditional GET" if the request message includes an If-* (If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match, or If-Range) header field.…
2
votes
1 answer

WebDAV properties returned back in request even after setting them

I am trying to develop a simple CalDAV server for my application and in this regard I am trying to serve the initial PROPFIND request from the calendar client. The calendar client requests for a set of properties (as shown below) to be set by the…
SGuru
  • 645
  • 1
  • 11
  • 28
2
votes
0 answers

timeout behaviour of httpClient in C#

I have a question about HttpClient. I use it like this HttpClient client = new HttpClient(MyHandler, false); I use WebRequest.GetSystemproxy() for the handler At some point, it lose the connection with the server and raise exceptions (taskcancel ,…
Raphael
  • 21
  • 2