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
1
vote
1 answer

HTTP Connection: Keep-Alive

I was looking at the HTTP 1.1 spec and was looking at the part of the spec related to the 'Connection' header. I noticed the the only token that is specified for the 'Connection' header is "close". After a little digging I found that the…
PatTheGamer
  • 471
  • 4
  • 17
0
votes
2 answers

HTTP/1.1 502 Proxy Error in j2me

I get the following error while trying to connect to a network in J2ME project Exception java.io.IOException: Error initializing HTTP tunnel connection: HTTP/1.1 502 Proxy Error ( The specified Secure Sockets Layer (SSL) port is not allowed. ISA…
Yatin
  • 21
  • 2
  • 4
0
votes
2 answers

HTTPS page returning HTML source and header rather than content?

I'm building a web app with PHP and Python (The site has SSL) and once in a very long while, randomly, the page returns the header message followed by the HTML source, rather than showing the page's content. This happens sometimes once out of every…
steve
  • 3,878
  • 7
  • 34
  • 49
0
votes
1 answer

How to implement HTTP 1.0 / 1.1 in ASP.NET

I wanted to know the best way to implement the following in ASP.NET. I have never used these directives so if you could kindly give me a sample code, It would be really helpful. HTTP/1.0 Pragma header HTTP/1.1 Cache - Control header Backdated…
0
votes
0 answers

JavaScript WebSocket closes connection straight away

I'm writing my own script to connect to a websocket server with JavaScript using the WebSocket API. I'm having problems with the connection closing straight away. Here's the client side script: var host = 'ws://localhost:8080'; try { …
Chris
  • 51
  • 1
  • 11
0
votes
1 answer

HTTP/1.1 426 Upgrade Required on heroku

I'm running a dyno for my Heroku ws and express server, but I have the response code 426 everytime I try to reach the express server. Event when I click on the "open app" to open in by browser, I have the same error message. I'm running the client…
Neoz
  • 11
0
votes
0 answers

How correctly call an websocket from FE using http1.1

The backend engineer has implemented a websocket. I'm able to call it via CURL. As I understand this is not a websocket but an http1.1 layer, that is like a websocket and uses the same handshake. In the curl I've hardcoded "Sec-WebSocket-Key" but…
ChrisGuru
  • 107
  • 13
0
votes
0 answers

How to make the web server support http 1.1 persistent connections?

I first use epoll to listen to the local socket_fd , if a non-local socket_fd triggers epoll , the socket_fd will be passed to a thread pool for processing. The processing flow is like this. unlisten the socket_fd from epoll read the request (recv)…
Nullptr
  • 19
  • 1
0
votes
0 answers

Server sending Connection:close header for Async HTTP calls using Jetty Client

I have a usecase where my service makes HTTP calls to a downstream Java Service . When these HTTP calls are made using Jetty's Async HTTP Client the Downstream Service sends Connection:close as part of the response headers . This degrades our…
Anuja Barve
  • 300
  • 1
  • 4
  • 23
0
votes
0 answers

XMLRPC Client Connection Header Keepalive in HTTP 1.1 in Java Application

We are implementing xmlrpc client where HTTP 1.1 is implemented at server end. Server end is with another company and we can not change it. As HTTP 1.1 RFC Server send us Connection header without Keep-Alive and xmlrpc client should not close it…
0
votes
0 answers

HTTP header to force HTTP/1.1 when using HTTPS

I cannot find this information anywhere, since all questions are library specific or are about forcing use of HTTP/2. Is it possible to set (force) the HTTP version to HTTP/1.1 via headers when connecting to a server using HTTPS? I have read that…
myol
  • 8,857
  • 19
  • 82
  • 143
0
votes
0 answers

How to disable HTTP/1.1 200 OK in WCF calls

We need to send data without waiting for HTTP/1.1 200 OK response. Is it possible to send data parallelly without waiting for HTTP/1.1 200 OK response. How to handle http pipelining in WCF application. Multi Request-Response function should be used…
Sharon
  • 757
  • 6
  • 21
  • 44
0
votes
0 answers

Http 1.1 connection pooling vs Websockets

Generally people compared Websockets and http long polling. But in connection pooling using http 1.1 (which browser does or we do from application server to db server ) , persistent connection is made and all http requests made through same…
Yusuf
  • 321
  • 1
  • 7
  • 19
0
votes
2 answers

Apache webserver: Fall back to http/1.1 Protocol only for certain user-agent

I would like the Apache webserver to normally deliver content with the "http/2"-Protocol, but to fall back to "http/1.1" if the connection stems from a certain user-agent, which has faulty http/2-Support. My current workaround is to disable http/2…
0
votes
1 answer

How to issue a graceful close in both http server and browser side when time out?

In http1.1(http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html), it says: When a client or server wishes to time-out it SHOULD issue a graceful close on the transport connection. Clients and servers SHOULD both constantly watch for the other…
atomd
  • 558
  • 1
  • 5
  • 11