Osky1088
New Member.
267 views

Issue with slash at the end of a path

Hi there,

We are getting a redirect (HTTP 302 found) to a protected resource with "/" at the end of the requested path, to be more specific:

Supposing my reverse proxy is https://example.com/ and the web server have a path called DpoService.svc
When we consume it through example.com somewhere we get a redirect to https://example.com/DpoService.svc/ (whit "/" at the end) because of that then the web server responds HTTP 400 Bad Request because of that "/". If we consume the path directly to the web server by IP address or host name there is no redirect.

We have installed a Novell Access Gateway Appliance v4.1. Any have a clue what is happening? Who do the redirect?

Thanks in advance
0 Likes
4 Replies
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: Issue with slash at the end of a path

On 25-05-2019 4:54 AM, oyrincon wrote:
>
> Hi there,
>
> We are getting a redirect (HTTP 302 found) to a protected resource with
> "/" at the end of the requested path, to be more specific:
>
> Supposing my reverse proxy is https://example.com/ and the web server
> have a path called DpoService.svc
> When we consume it through example.com somewhere we get a redirect to
> https://example.com/DpoService.svc/ (whit "/" at the end) because of
> that then the web server responds HTTP 400 Bad Request because of that
> "/". If we consume the path directly to the web server by IP address or
> host name there is no redirect.
>
> We have installed a Novell Access Gateway Appliance v4.1. Any have a
> clue what is happening? Who do the redirect?
>
> Thanks in advance
>
>


Have you enabled dumpHeaders?

DumpHeaders on
DumpResponseHeaders on
DumpHeadersFacility local6
DumpResponseHeadersFacility local6

This will show you all the headers (and logs it to a separate file). That way you can find the request and response easily and see exactly what the
webserver (from-ws) responded with incl all the headers (in this case potentially your 302).

--
Cheers,
Edward
0 Likes
Highlighted
Osky1088
New Member.

Re: Issue with slash at the end of a path

Hello Edward, thanks for your quick response.

In the dumps I found that the 302 redirect is at "creq" step, I'm not sure what it means, is it the NAG, or is the browser who do the redirect.

May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:creq [10.232.1.3:53262->10.1.0.74:443] GET /DpoService.svc
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:creq Host: ambientepruebas.segurosbolivar.com
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:creq User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:creq Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:creq Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:creq Accept-Encoding: gzip, deflate, br
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:creq Connection: keep-alive
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:creq Cookie: ZNPCQ003-39313100=f76d189e; _ga=GA1.2.2037135868.1553803812; IPCZQX037c94d997=01002c000a01080737e7438834ebc0d74bd907d2
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:creq Upgrade-Insecure-Requests: 1
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:cres status:302 302 Found
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:cres Via: 1.1 ambientepruebas.segurosbolivar.com (Access Gateway-ag-8446036A1ACBBF29-380012)
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:cres Location: https://ambientepruebas.segurosbolivar.com/DpoService.svc/
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:cres Content-Length: 164
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:cres Keep-Alive: timeout=300, max=100
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:cres Connection: Keep-Alive
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:cres Content-Type: text/html; charset=iso-8859-1
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:creq [10.232.1.3:53262->10.1.0.74:443] GET /DpoService.svc/
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:creq Host: ambientepruebas.segurosbolivar.com
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:creq User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:creq Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:creq Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:creq Accept-Encoding: gzip, deflate, br
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:creq Connection: keep-alive
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:creq Cookie: ZNPCQ003-39313100=f76d189e; _ga=GA1.2.2037135868.1553803812; IPCZQX037c94d997=01002c000a01080737e7438834ebc0d74bd907d2
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:creq Upgrade-Insecure-Requests: 1
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:to-ws [10.1.0.76:54226->10.1.6.186:3760] GET /DpoService.svc/ HTTP/1.1
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:to-ws Host: br02sbcc04.bolivar.com:3760
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:to-ws User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:to-ws Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:to-ws Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:to-ws Accept-Encoding: gzip, br
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:to-ws Cookie: _ga=GA1.2.2037135868.1553803812; IPCZQX037c94d997=01002c000a01080737e7438834ebc0d74bd907d2
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:to-ws Upgrade-Insecure-Requests: 1
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:to-ws Via: 1.1 ambientepruebas.segurosbolivar.com (Access Gateway-ag-8446036A1ACBBF29-380013)
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:to-ws X-Forwarded-For: 10.232.1.3
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:to-ws X-Forwarded-Host: br02sbcc04.bolivar.com:3760
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:to-ws X-Forwarded-Server: ambientepruebas.segurosbolivar.com
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:to-ws Connection: Keep-Alive
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:frm-ws status:400 400 Bad Request
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:frm-ws Server: Microsoft-IIS/8.5
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:frm-ws X-Powered-By: ASP.NET
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:frm-ws Date: Mon, 27 May 2019 18:51:09 GMT
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:frm-ws Content-Length: 0
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:cres status:400 400 Bad Request
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:cres X-Powered-By: ASP.NET
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:cres Vary: Accept-Encoding
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:cres Content-Encoding: gzip
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:cres Via: 1.1 ambientepruebas.segurosbolivar.com (Access Gateway-ag-8446036A1ACBBF29-380013)
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:cres Connection: close
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:cres Transfer-Encoding: chunked
May 27 13:51:09 namgpru01 httpd[25998]: ID:380013:2107:cres Expires: Mon, 27 May 2019 18:51:09 GMT


Regards, Oskar
0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: Issue with slash at the end of a path

On 28-05-2019 6:26 AM, oyrincon wrote:
>
> Hello Edward, thanks for your quick response.
>
> In the dumps I found that the 302 redirect is at "creq" step, I'm not
> sure what it means, is it the NAG, or is the browser who do the
> redirect.


May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:creq Upgrade-Insecure-Requests: 1
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:cres status:302 302 Found
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:cres Via: 1.1 ambientepruebas.segurosbolivar.com (Access Gateway-ag-8446036A1ACBBF29-380012)
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:cres Location: https://ambientepruebas.segurosbolivar.com/DpoService.svc/
May 27 13:51:09 namgpru01 httpd[25998]: ID:380012:2107:cres Content-Length: 164

So NAM is responding with a 302 to https://ambientepruebas.segurosbolivar.com/DpoService.svc/

In that request there is no to-ws and frm-ws so it is definitely not caused by the backend app/web server. I'm not sure why NAM is doing that to be
honest. What exact version are you on?

--
Cheers,
Edward
0 Likes
ashmoore Absent Member.
Absent Member.

Re: Issue with slash at the end of a path

oyrincon;2500207 wrote:
Hi there,

We are getting a redirect (HTTP 302 found) to a protected resource with "/" at the end of the requested path, to be more specific:

Supposing my reverse proxy is https://example.com/ and the web server have a path called DpoService.svc
When we consume it through example.com somewhere we get a redirect to https://example.com/DpoService.svc/ (whit "/" at the end) because of that then the web server responds HTTP 400 Bad Request because of that "/". If we consume the path directly to the web server by IP address or host name there is no redirect.

We have installed a Novell Access Gateway Appliance v4.1. Any have a clue what is happening? Who do the redirect?

Thanks in advance

4.1 is really old, probably worth upgrading to a much more recent version.

-----x==---x===----- I used to be an eagle......
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.