Welcome! Log In Create A New Profile

Advanced

Re: how to trigger "proxy_next_upstream invalid_header"?

Roman Arutyunyan
January 25, 2018 07:24AM
Hi Jeffrey,

On Thu, Jan 25, 2018 at 05:41:50PM +0800, Jeffrey 'jf' Lim wrote:
> This is more of a curiosity thing, I guess, than anything else, but...
> how do you trigger an "proxy_next_upstream invalid_header" when
> testing?
>
> I've tried basically sending random text from an upstream ('nc -l')...
> but nginx holds on to the connection and ends up triggering a
> "timeout" instead. If I send random text, and then close the
> connection, the random text still gets sent to the client, and no next
> peer is tried.

The easiest way is to send the status line + header bigger than
proxy_buffer_size bytes. Another way is to send a null byte somewhere in the
response header. You can also try sending broken line and header termination:
CR followed by a non-LF byte.

--
Roman Arutyunyan
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

how to trigger "proxy_next_upstream invalid_header"?

Jeffrey 'jf' Lim January 25, 2018 04:44AM

Re: how to trigger "proxy_next_upstream invalid_header"?

Roman Arutyunyan January 25, 2018 07:24AM

Re: how to trigger "proxy_next_upstream invalid_header"?

Jeffrey 'jf' Lim January 27, 2018 09:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 216
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready