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

Close socket if there is a period of inactivity in a multi-connection webserver

I am building a webserver which can accept and handle multiple client connections. I'm using select() for this. Now while this is going on, if a particular connected socket hasn't had any activity (send or recv) on it, I want to close it. So if no…
Raghav
  • 41
  • 3
4
votes
1 answer

Nodejs giving me download instead of html response

Here is my code: var express = require('express'), app = express.createServer(express.logger()); app.use(express.bodyParser()); app.get('/', function(request, response) { var name = request.param('name', null); …
funerr
  • 7,212
  • 14
  • 81
  • 129
4
votes
2 answers

Correct HTTP 1.1 header response code after form submission

In my MVC framework I sometimes redirect after form submission. Say you post a form to /example/input. I want to add the proper header code and explanatory text in PHP with e.g. header('HTTP/1.1 404 Not Found'); 1) Your input contains errors. You…
preyz
  • 3,029
  • 5
  • 29
  • 36
3
votes
1 answer

Disable http keep-alive on ASMX webservice

I have a .net webservice (old-school, not WCF) running on a website on IIS7. I need to disable http keep-alive for the webservice, but not for the rest of the site. Is it possible to override what IIS is doing here, just for that service? I cannot…
Nik
  • 2,718
  • 23
  • 34
3
votes
2 answers

keep alive, what is the difference between HTTP1.1 and TCP

There are two headers relate to Http keep alive, Connection: Keep-Alive Keep-Alive: timeout=5, max=1000 Which side sends HTTP1.1 "Keep-Alive: param"? When client and server use HTTP1.1, will client send TCP keep alive probe? In order to use…
Tiina
  • 4,285
  • 7
  • 44
  • 73
3
votes
3 answers

What is the overhead in nginx to proxy an HTTP/2 request to an HTTP/1.1 request?

I have an Nginx proxy server. When an HTTP/2 request comes to the server and does not find anything in cache, the server makes an outbound request to the origin server using HTTP/1.1. Is there a performance degradation on the server when it…
Eric
  • 6,563
  • 5
  • 42
  • 66
3
votes
0 answers

How will you design a proxy server that supports HTTP 1.1 keep-alive completely?

It seems even nginx only half supports HTTP 1.1 keep-alive requests: It is an HTTP/1.0 proxy without the ability for keep-alive requests yet. (As a result, backend connections are created and destroyed on every request.) Nginx talks…
DriverBoy
  • 937
  • 1
  • 11
  • 23
3
votes
1 answer

Can axios be configured to use HTTP/1.1?

We use axios to query an API and as long as QUIC is enabled in Chrome the request fails, because the server does not support it. Can axios be configured to use only HTTP/1.1 for a certain request?
nning
  • 71
  • 1
  • 5
3
votes
2 answers

Is using HTTP 1.0 bad practice?

I'm implementing a basic http client for communicating with a web service and am wondering if I should go with http 1.0 or 1.1. The data section will consist of binary data and the remote server will always be controlled by me (running IIS7.5). The…
m__
  • 1,721
  • 1
  • 17
  • 30
3
votes
2 answers

Is there a way to force an XMLHttpRequest to use HTTP/1.1?

I have a server endpoint that supports both HTTP/1.1 and HTTP2. For testing purposes, I want to try downloading content from the endpoint with both HTTP/1.1 and HTTP2 connections, possibly at the same time. When I request data from the endpoint with…
Lincoln Bergeson
  • 3,301
  • 5
  • 36
  • 53
3
votes
0 answers

How do browsers decide when to open a new connection when using HTTP/1.1?

In HTTP/1.1, browsers will open multiple TCP sessions in parallel to speed up the loading process. For example, in the screenshot chrome opens 5 connections in total. My question is, how does a browser like Chrome decide when to open a new…
sq29
  • 193
  • 9
3
votes
1 answer

http POST message body not received

Im currently creating a python socket http server, and I'm working on my GET and POST requests. I got my GET implementation working fine, but the body element of the POST requests won't show up. Code snippet: self.host = '' self.port =…
mmoe
  • 95
  • 1
  • 2
  • 7
3
votes
1 answer

How does chunked downloading work in http/2 (or better what is the equivalent?)

In chunked downloading, there are extensions on each chunk that can be leveraged when coming to a browser. the last chunk can also contain optional headers defining stuff like content-length if we streamed a big file through, we can provide that…
Dean Hiller
  • 19,235
  • 25
  • 129
  • 212
3
votes
3 answers

how to solve HTTP/1.1 302 Found error when trying to get contents of a form in php?

I'm having a bug in my aplication, when I try to submit a form (POST Method) with a lot of information, an HTTP/1.1 302 Found error occur to the file that receive the info and make a redirrection to my index The html code and php are both simple,…
Gendrith
  • 196
  • 1
  • 4
  • 13
2
votes
0 answers

HTTP Connection pooling Java

I work in a project that uses Spring Boot as framework and that make SOAP call through WebServiceTemplate on HTTP 1.1 protocol. I've implemented an HTTPClient like this: @Bean public PoolingHttpClientConnectionManager poolingConnManager() { …