3

Is there a specific (or agreed upon) HTTP response message (or another action except for disconnection) to clarify that the server does not accept pipelined HTTP requests?

I'm looking for something that will make the client stop pipelining it's requests, and to send each request separately.

If so, what is it? Thank you!

Reflection
  • 1,936
  • 3
  • 21
  • 39
  • From that WikiPedia article: _“HTTP/1.1 conforming servers are required to support pipelining. This does not mean that servers are required to pipeline responses, but that they are required not to fail if a client chooses to pipeline requests.”_ … so I don’t really understand _why_ you are looking for such a response here? If your server is not HTTP/1.1 compliant, then it should have negotiated to fall back to HTTP/1.0 before already with the client. – CBroe Mar 11 '14 at 10:04

2 Answers2

4

I'm a bit late on this one :-)

For reference the clean way of rejecting a pipelined connection is to add a Connection: close header on the first and unique response.

An HTTP client receiving a close on the first response of a pipeline MUST replay all remaining queries, and will certainly choose to stop pipelining.

regilero
  • 29,806
  • 6
  • 60
  • 99
  • I was about to reply that this isn't very helpful to the client as they have to wait for the first response to know that their second (and possibly further) requests will not be serviced. But of course since the server needs to reply in-order, it cannot reply to subsequent requests until it responds to the first one. Expect by aborting the first request, which is even less helpful! (I hope this helps others avoid the confusion I had initially.) – Simon Pickup Aug 02 '19 at 13:45
  • Sorry, but you have to wait for the first response and detect the 'connection: close' on this first response to know that were will be no pipeline. But a pipelining client should expect to receive less responses that requested, you can request 5 and only get the first 4 responses. Or request 10 and get only the first one. – regilero Aug 05 '19 at 07:47
0

i think you should execute some command on your server ..

See Here Look at the comment also

Fisherman
  • 5,949
  • 1
  • 29
  • 35