HTTP 1.0

Maxim Dounin mdounin at mdounin.ru
Wed Feb 13 19:05:23 UTC 2019


Hello!

On Wed, Feb 13, 2019 at 12:12:15PM -0600, Dusty Campbell wrote:

> Thanks for the help.
> 
> > There is no way to force HTTP/1.0.  You can, however, disable
> > various HTTP/1.1-specific mechanisms, including keepalive and
> > chunked transfer encoding, see here:
> >
> > http://nginx.org/r/keepalive_timeout
> > http://nginx.org/r/chunked_transfer_encoding
> >
> 
> It appears that these were the directives I needed. Pending more
> testing it seems to be working now.
> 
> > You may want to be more specific on what you are trying to do.
> 
> What I was trying to achieve was RTSP-over-HTTP tunneling.
> https://opensource.apple.com/source/QuickTimeStreamingServer/QuickTimeStreamingServer-412.42/Documentation/RTSP_Over_HTTP.pdf

Well, I wouldn't expect this to depend on HTTP/1.0 being used, as 
well as keepalive connections and/or chunked transfer encoding 
(unless the client is also buggy and announces HTTP/1.1 support 
without actually implementing HTTP/1.1).

But clearly there will be problems with this tunneling, as it goes 
far beyond what is guaranteed by the HTTP standard.  The most 
serious problem is an assumption that request and response bodies 
are streams.  They are not.  And, for example, it is not 
guaranteed that a proxy will start sending a POST request to the 
upstream server before it receives the full request body (which is 
not going to happen).

With nginx, this is certainly not going to work by default, but 
may work with proxy_buffering and proxy_request_buffering 
disabled, see here:

http://nginx.org/r/proxy_buffering
http://nginx.org/r/proxy_request_buffering

Also, the pdf in question suggests that Content-Length in requests 
is expected to be ignored by proxies.  It is not in the modern 
world, and if the client relies on this, it is not going to work 
at all.  If it is the case, the only option I can recommend would 
be to use stream proxy instead, see here:

http://nginx.org/en/docs/stream/ngx_stream_core_module.html

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx mailing list