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

Google Cloud HTTP(S) load balancer does not cancel connection with backend

I have a Google Kubernetes Engine cluster, inside several pods with NodePorts, and all is exposed via an Ingress, which creates an HTTP load balancer (LB). I am using custom domain with Google managed SSL certificate for the LB. My backend is an…
0
votes
1 answer

Lua Socket Send 200 OK close connection

What is minimal HTTP 200 OK Connection close response for Nginx/lua/openresty. I have: local sock, err = ngx.req.socket(true) sock:send("HTTP/1.1 200 OK\\r\\nConnection: close\\r\\n\\r\\n") and curl says: curl: (52) Empty reply from server
Sergii Getman
  • 3,845
  • 5
  • 34
  • 50
0
votes
1 answer

nginx configs to haproxy

I want equivalent of nginx config in haproxy. Went through lot of links but none of them mentioned anything related to below configs. proxy_http_version 1.1; proxy_set_header Connection "";
avaj
  • 299
  • 1
  • 5
  • 11
0
votes
1 answer

Is there anything in http1.1 that says I can't send the response before the body of the request is done being sent?

In http2, you can send a header response back 'before' the body of the request is fully sent. Of course, you then have to deal with sending an http 200 OK response and then something failing later. This is fine for us. I am wondering for a…
Dean Hiller
  • 19,235
  • 25
  • 129
  • 212
0
votes
1 answer

TypeError: Network request failed for 204 (No Content) and 304 (Not Modified) call over HTTP2 (ERR_HTTP2_PROTOCOL_ERROR in Chrome)

We have switched from HTTP1.1 to HTTP2 protocol and have noticed that some requests fail. When a server responds with 204 or 304 we get the following error: TypeError: Network request failed Chrome additionally shows it with the following error on…
Ilya Chernomordik
  • 27,817
  • 27
  • 121
  • 207
0
votes
1 answer

Python Socket GET request from URL not understood with correct format?

Im trying to set up a http request for an assignment to connect to a webserver and count how many times a given word occurs in the page. Im working on the first half of this and every time i try to send the request for the header information with…
0
votes
1 answer

Istio 1.1.11 not supporting http2?

I recently asked this question on how to upgrade Istio 1.1.11 from using http1.1 to http2. I followed the advice and my resultant services YAML looks like this.…
Anoop Hallimala
  • 625
  • 1
  • 11
  • 25
0
votes
1 answer

SOAP response get truncated for big payload

We have a legacy SOAP web service, implemented using Apache Axis 1. At the client environment, the response data sometimes gets truncated on certain API calls causing error. But when tested using SOAP UI client, it returns full data as expected.…
yonikawa
  • 581
  • 1
  • 9
  • 32
0
votes
1 answer

How to test connection protocol when call TwitterAPI using PHP? (SPDY or HTTP/1.0, 1.1)

From this update of Twitter https://twittercommunity.com/t/removing-support-for-spdy-protocol-on-twitter/132530 How can I determine connection protocol in my server to know above changes affect my code or not? My server running CentOS 6.5 and call…
VitDuck
  • 83
  • 9
0
votes
2 answers

Using keep-alive connections (HTTP 1.1) to create ftp-like sessions in PHP

I'm looking for a way to keep track of a HTTP 1.1 connection kept alive across requests, in order to get a ftp-like session. The idea would be to have an authentication at first request, and then, keeping the authentication valid while the socket is…
picrap
  • 1,236
  • 1
  • 13
  • 35
0
votes
1 answer

In cache-Control header field why does it named as "directives"?

I wanted to know why standard HTTP/1.1 header fields define Cache-Control as directives ? and other header fields not marked as same. I went though the all standard HTTP/1.1 header fields [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html]…
Prageeth godage
  • 4,054
  • 3
  • 29
  • 45
0
votes
1 answer

Why does HTTP/2 show a different type of header for status codes like 404

Why does HTTP/2 show a different type of header for status codes like 404 e.g: When I curl a HTTP/2 compatible webserver for a file that doesn't exist, I get HTTP/2 404 .....other headers When I curl a HTTP/1.1 webserver for a file that doesn't…
Example person
  • 3,198
  • 3
  • 18
  • 45
0
votes
1 answer

Nginx not forwarding reason phrase

I am hosting my Django app with Gunicorn. What happen is as follow A sample response from Django would be as follow @require_http_methods(['POST']) def register(request): body = json.loads(request.body.decode('utf-8')) try: email =…
0
votes
1 answer

http1.1 Keep-Alive without pipelining

I'm implementing a server that is sending to the client a http keep-alive request but I would like that the client does not make pipelining requests. Is there any flag to tell client to not do multiple pipeline requests? The keep-alive request seams…
KammutierSpule
  • 109
  • 1
  • 5
0
votes
1 answer

cpu usage comparison of http2 and http1 requests

Sending 400 HTTP/1 requests is generating 90% CPU usage, while, sending 150 HTTP/2 requests is generating 80% CPU usage. Why does HTTP/2 take more CPU usage relative to HTTP/1 using curl command?