Welcome! Log In Create A New Profile


Re: Fwd: RTSP request response

Maxim Dounin
March 11, 2020 08:02AM

On Wed, Mar 11, 2020 at 01:06:06AM +0300, Valentin V. Bartenev wrote:

> On Tuesday, 10 March 2020 18:43:56 MSK Seena Fallah wrote:
> > Hi all.
> > When we send RTSP request to NGINX, NGINX will return 400 bad request
> > without headers and when we have loadbalancers like HAProxy in front of
> > NGINX because of no headers, HAProxy figured out that the response from
> > NGINX is invalid and return 502!
> > Won't you want to send headers with the response for these types of
> > requests?
> >
> What nginx version do you use?
> If nginx fails to parse a request line, it returns a valid HTTP/1.0 response
> (with headers).
> But before nginx 1.5.5 (which was released about 7 years ago) it used HTTP/0.9
> protocol to respond in this case.

The RTSP protocol uses requests like (quote from

OPTIONS rtsp://example.com/media.mp4 RTSP/1.0
CSeq: 1
Require: implicit-play
Proxy-Require: gzipped-messages

This will be interpreted as HTTP/0.9 request with method "OPTIONS"
and URI "rtsp://example.com/media.mp4 RTSP/1.0", and will trigger
400 due to invalid method for HTTP/0.9.

Removing support for spaces in URI (as introduced in 31e9677b15a1,
0.8.41) should make the response to be interpreted as a garbage
instead, leading to a HTTP/1.0 response. Since support for spaces
in URI is something known to cause other issues as well (see
https://trac.nginx.org/nginx/ticket/196), this might be something
are willing to do.

Note though that it is generally a bad idea to assume that a RTSP
frequest will trigger a meaningful response from an HTTP server.

Maxim Dounin
nginx-devel mailing list
Subject Author Views Posted

Fwd: RTSP request response

Seena Fallah 97 March 10, 2020 11:46AM

Re: Fwd: RTSP request response

Valentin V. Bartenev 12 March 10, 2020 06:06PM

Re: Fwd: RTSP request response

Maxim Dounin 23 March 11, 2020 08:02AM

Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 62
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready