Re: headers do not work

2024-04-29 Thread Roman Arutyunyan
Hi,

On Fri, Apr 26, 2024 at 05:19:48PM -0400, Saint Michael wrote:
> I am not using openresty as a proxy but as a web server. Twitter
> requests an image, and it sends the HTTP request with header
> "Finagle-Ctx-com.twitter.finagle." This makes nginx abort the
> operation.
> I need the operation to be completed as designed.  For that, I added
> underscores_in_headers (on or off) makes no difference.
> ignore_invalid_headers on (on or off) makes no difference
> any ideas?

It's very strange that "ignore_invalid_headers off" did not work for you.
It disables this error and makes nginx treat the problematic header as normal.
Please double-check this.  There's no other part of code in nginx that would
generate an error like that.  And the part that does, can be disabled by
"ignore_invalid_headers off".

Also, skipping the header should not abort the request.  Please check the
error log for the real reason why this is happening.

> On Fri, Apr 26, 2024 at 8:20 AM Roman Arutyunyan  wrote:
> >
> > Hi,
> >
> > > On 25 Apr 2024, at 8:10 AM, Saint Michael  wrote:
> > >
> > > I keep getting this error
> > > *356 client sent invalid header line:
> > > "Finagle-Ctx-com.twitter.finagle.Retries: 0" while reading client
> > > request headers, and twitter cannot read my twitter-card
> > > yet, I do have
> > > underscores_in_headers on;
> > > ignore_invalid_headers on;
> > > in the http{} block
> > > How do I force nginx to disregard any illegal headers?
> >
> > What exactly do you mean by disregard?
> > Do you want nginx to skip them or allow them to pass?
> >
> > The "ignore_invalid_headers on" directive (which is also the default) 
> > explicitly enables skipping them, and this fact is reported in log.
> > Turn it off and those characters (dot in your case) will pass.
> >
> > ---
> > Roman Arutyunyan
> > a...@nginx.com
> >
> >
> >
> > ___
> > nginx mailing list
> > nginx@nginx.org
> > https://mailman.nginx.org/mailman/listinfo/nginx
> ___
> nginx mailing list
> nginx@nginx.org
> https://mailman.nginx.org/mailman/listinfo/nginx

--
Roman Arutyunyan
___
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx


Re: headers do not work

2024-04-26 Thread Saint Michael
I am not using openresty as a proxy but as a web server. Twitter
requests an image, and it sends the HTTP request with header
"Finagle-Ctx-com.twitter.finagle." This makes nginx abort the
operation.
I need the operation to be completed as designed.  For that, I added
underscores_in_headers (on or off) makes no difference.
ignore_invalid_headers on (on or off) makes no difference
any ideas?

On Fri, Apr 26, 2024 at 8:20 AM Roman Arutyunyan  wrote:
>
> Hi,
>
> > On 25 Apr 2024, at 8:10 AM, Saint Michael  wrote:
> >
> > I keep getting this error
> > *356 client sent invalid header line:
> > "Finagle-Ctx-com.twitter.finagle.Retries: 0" while reading client
> > request headers, and twitter cannot read my twitter-card
> > yet, I do have
> > underscores_in_headers on;
> > ignore_invalid_headers on;
> > in the http{} block
> > How do I force nginx to disregard any illegal headers?
>
> What exactly do you mean by disregard?
> Do you want nginx to skip them or allow them to pass?
>
> The "ignore_invalid_headers on" directive (which is also the default) 
> explicitly enables skipping them, and this fact is reported in log.
> Turn it off and those characters (dot in your case) will pass.
>
> ---
> Roman Arutyunyan
> a...@nginx.com
>
>
>
> ___
> nginx mailing list
> nginx@nginx.org
> https://mailman.nginx.org/mailman/listinfo/nginx
___
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx


Re: headers do not work

2024-04-26 Thread Roman Arutyunyan
Hi,

> On 25 Apr 2024, at 8:10 AM, Saint Michael  wrote:
> 
> I keep getting this error
> *356 client sent invalid header line:
> "Finagle-Ctx-com.twitter.finagle.Retries: 0" while reading client
> request headers, and twitter cannot read my twitter-card
> yet, I do have
> underscores_in_headers on;
> ignore_invalid_headers on;
> in the http{} block
> How do I force nginx to disregard any illegal headers?

What exactly do you mean by disregard?
Do you want nginx to skip them or allow them to pass?

The "ignore_invalid_headers on" directive (which is also the default) 
explicitly enables skipping them, and this fact is reported in log.
Turn it off and those characters (dot in your case) will pass.

---
Roman Arutyunyan
a...@nginx.com



___
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx


headers do not work

2024-04-24 Thread Saint Michael
I keep getting this error
 *356 client sent invalid header line:
"Finagle-Ctx-com.twitter.finagle.Retries: 0" while reading client
request headers, and twitter cannot read my twitter-card
yet, I do have
underscores_in_headers on;
ignore_invalid_headers on;
in the http{} block
How do I force nginx to disregard any illegal headers?
___
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx