cancel
Showing results for 
Search instead for 
Did you mean: 

Header field 'location': difference between WAS 6.20 and 6.40

Former Member
0 Kudos

Hello,

we developed a Java application on WAS 6.20.

The application uses redirects and will be accessed from the internet via a reverse proxy.

With WAS 6.20 the header field ‘location’ contains only the context path of the URL.

With WAS 6.40 this header field contains now the full URL. In this case the redirect will be send to the intranet server, which can not accessed directly from the internet.

Is there a way to control the output of the header field ‘location’ (e.g. profile parameter, J2EE parameter)?

Thanks

Uwe

Examples:

<i>WAS 6.20</i>

>wget --http-user=* --http-passwd=* -S http://was620server/contentpath/

12:28:03 http://was620server/contentpath/

=> `index.html'

Resolving was620server... done.

Connecting to was620server[157.1.1.2]:80... connected.

HTTP request sent, awaiting response...

1 HTTP/1.1 302 Found

<b> 2 location: /contentpath/index.htm</b>

3 content-length: 0

4 date: Tue, 07 Jun 2005 10:28:03 GMT

5 connection: Keep-Alive

<i>WAS 6.40</i>

>wget --http-user=linduwxp --http-passwd=05wasn04 -S http://was640server/contentpath/

13:08:10 http://was640server/contentpath/

=> `index.html'

Resolving was640server... done.

Connecting to was640server[157.1.1.4]:80... connected.

HTTP request sent, awaiting response...

1 HTTP/1.1 302 Found

<b>2 location: http://was640server/contentpath/index.htm</b>;

3 server: SAP J2EE Engine/6.40

4 content-length: 0

5 date: Tue, 07 Jun 2005 11:08:10 GMT

6 connection: Keep-Alive

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks a lot.

We have found the error. It had nothing to do with the header field, but with a reverse proxy setting.

Regards,

Uwe Lindemann

Former Member
0 Kudos

Ivo, thank you for your reply.

But I think mapping ports doesn't solve our problem.

WAS 6.20:

Just the context path will be send in the header field 'location' to the browser (located in the internet).

In case of a redirect the browser mixes the server name of the sender (the reverse proxy) and the context path and sends the request to the reverse proxy. The reverse proxy forwards the request to the WAS 6.20 intranet server.

WAS 6.40:

The header field 'location' contains now the whole URL (with the server name of the WAS 6.40 system, which is only accessible from our intranet).

In case of a redirect the browser takes the content of the header field 'location' and sends the request to the not accessible WAS 6.40 intranet server. Of course that doesn't work.

So it it depends on the content of the header field 'location'.

What can we do in WAS 6.40, so that the header field 'location' contains only the context path as it has done in WAS 6.20?

Regards,

Uwe

Former Member
0 Kudos

Hi Uwe,

The absolute URI in location is per HTTP 1.1 spec (RFC 2616, 14.30 Location chapter).

The property in link provided from Ivo is for cases where WebAS is behind other machine visible to the client (like reverse proxy or NAT). It provides info to server what host and port should be included in the generated redirect responses.

Regards,

Svilen.

Former Member
0 Kudos

Hi Uwe,

on Web AS 6.40 you can use a property of the HTTP Provider Service to map a port on the J2EE Engine's dispatcher to the proxy's host and port. You can change this property with the Visual Administrator as described <a href="http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/frameset.htm">here</a>. Do you think this can solve your problem?

Regards,

Ivo