Welcome! Log In Create A New Profile

Advanced

Re: Embedded variables from ngx_http_core_module and websocket connections

Dorin RuV
July 22, 2021 03:56AM
Wow! That's it! Thank you, Francis!

I need to catch up with some reading on http//2.0. I didn't know that
"Connection Upgrade" is http/1.1 specific.

So, in order to set up the websocket anyway and keep http/2.0 (don't know
how much sense that makes) there would be 2 options as I see it:

1. Statically define the connection upgrade headers - "proxy_set_header
Connection Upgrade", but in this case there will never be a "connection:
close" coming from the client.

2. Create a custom header ("X-Upgrade-Custom" e.g.) and use
$http_x_upgrade_custom as connection starter, but this would extremely
specific to this constellation.

What do you think?

Best,
Dorin

Am Mi., 21. Juli 2021 um 23:40 Uhr schrieb Francis Daly <francis@daoine.org
>:

> On Tue, Jul 20, 2021 at 12:39:51PM +0200, Dorin RuV wrote:
>
> Hi there,
>
> > I'm currently having an issue with nginx which I cannot get to the bottom
> > of.
>
> > server{
> > listen 443 ssl http2;
>
> Does anything change if you just remove that "http2"?
>
> > location / {
> > proxy_http_version 1.1;
> > proxy_set_header Upgrade $http_upgrade;
>
> "Upgrade" is a http/1.1 header, not a http/2.0 header. So for an incoming
> http/2.0 request, the variable should be empty.
>
> > It seems though that the
> > $http_upgrade variable is seen as empty, even though tcpdump confirms the
> > fact that the Upgrade header is correctly sent to Nginx by the client
> > request.
>
> I'm guessing that tcpdump is showing that the http/1.1 request to port
> 80 includes the Upgrade header; but is not showing anything about what
> is in the encrypted http/2.0 request to port 443?
>
> Cheers,
>
> f
> --
> Francis Daly francis@daoine.org
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Embedded variables from ngx_http_core_module and websocket connections

Dorin RuV July 20, 2021 06:42AM

Re: Embedded variables from ngx_http_core_module and websocket connections

Sergey A. Osokin July 21, 2021 06:50AM

Re: Embedded variables from ngx_http_core_module and websocket connections

Dorin RuV July 21, 2021 09:48AM

Re: Embedded variables from ngx_http_core_module and websocket connections

Francis Daly July 21, 2021 05:42PM

Re: Embedded variables from ngx_http_core_module and websocket connections

Dorin RuV July 22, 2021 03:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 223
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