Welcome! Log In Create A New Profile

Advanced

Re: Unable to use a GET url-param

Francis Daly
April 15, 2017 11:22AM
On Sat, Apr 15, 2017 at 02:47:26PM +0530, Ajay Garg wrote:

Hi there,

> If there is no forwarded-port in listening state (port 5000 in this case)
> for the upstream-server, the request suitably returns a 502 error. More
> importantly, the $arg_upstream_protocol does seem to be parsed properly ::

Why do you have $arg_upstream_protocol? What is its purpose?

After you answer that, consider: why do you not also have
$arg_forwarded_port?

If the port to connect to, and the protocol to connect with, are
conceptually analogous, they should probably be handled in the same way.

(Set them both in maps.)

> So, the GET-param is being parsed fine (as evident from case a), seems I
> need to do some url-rewritings while the requests move to and from between
> nginx and upstream-server, right?

One request gets one response. If the response is a http 301, the next
request is a whole new request that should be considered separately.

If at all possible, do not design things so that you need to edit the
upstream response body before sending it to the client.

So: what is the output of "curl -v" on the first request?

What do you want the output to be, in your design?

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Unable to use a GET url-param

Ajay Garg April 14, 2017 09:14AM

Re: Unable to use a GET url-param

Francis Daly April 15, 2017 04:26AM

Re: Unable to use a GET url-param

Ajay Garg April 15, 2017 05:18AM

Re: Unable to use a GET url-param

Francis Daly April 15, 2017 11:22AM

Re: Unable to use a GET url-param

Ajay Garg April 16, 2017 12:20AM

Re: Unable to use a GET url-param

Ajay Garg April 17, 2017 01:50AM

Re: Unable to use a GET url-param

Francis Daly April 17, 2017 04:06AM

Re: Unable to use a GET url-param

Francis Daly April 17, 2017 04:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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