Closed Bug 207953 Opened 21 years ago Closed 21 years ago

"HTTP/1.1 302 Object Moved" in not followed through correctly

Categories

(Core :: Networking: HTTP, defect)

x86
Linux
defect
Not set
major

Tracking

()

VERIFIED INVALID

People

(Reporter: possiblespam, Assigned: darin.moz)

References

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529

with mozilla 1.4a and mozilla1.4rc1 two slightly different incorrect behaviors
are observed for the 302 HTTP error code. The browser does not redirect the page
correctly. In 1.4a it redirects to the wrong url. In 1.4rc1 it redirects to a
different url, in 1.4rc1 it does not seem to redirect at all.


Reproducible: Always

Steps to Reproduce:
I have not written a little server to reproduce the request response chat. 
But I have attached the full ethereal conversation.


Actual Results:  
-----------------Mozilla 1.4alpha --------------------------------

GET /ebiz HTTP/1.1
Host: 130.144.21.145
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4a) Gecko/20030401
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.1 302 Object Moved
Location: http://130.144.21.145/ebiz/
Server: Microsoft-IIS/5.0
Content-Type: text/html
Content-Length: 150

<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a
HREF="http://130.144.21.145/ebiz/">here</a></body>GET / HTTP/1.1
Host: 130.144.21.145
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4a) Gecko/20030401
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.1 403 Access Forbidden
Server: Microsoft-IIS/5.0
Date: Mon, 02 Jun 2003 10:43:10 GMT
Connection: close
Content-Type: text/html
Content-Length: 172

<html><head><title>Directory Listing Denied</title></head>
<body><h1>Directory Listing Denied</h1>This Virtual Directory does not allow
contents to be listed.</body></html>

--------Mozilla 1.4rc1 acts this way-------------------------------
GET /ebiz HTTP/1.1
Host: nlyehvgdc1ms045.gdc1.ce.philips.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://nlyehvgdc1ms047.gdc1.ce.philips.com/

HTTP/1.1 302 Object Moved
Location: http://nlyehvgdc1ms045.gdc1.ce.philips.com/ebiz/
Server: Microsoft-IIS/5.0
Content-Type: text/html
Content-Length: 171

<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a
HREF="http://nlyehvgdc1ms045.gdc1.ce.philips.com/ebiz/">here</a></body>

Expected Results:  
----in 1.4alpha ------
the browser should have asked the second time for

GET /ebiz/ HTTP/1.1

instead it asks for GET / HTTP/1.1

----In mozilla 1.4 release candidate 1 -----
the browser never asks for the redirected page
This one is in plain text as I had closed the ethereal session.
Is there a publicly available url where this can be tested?
The server we are using is internal to the company. 
I have not tried to duplicate it with another server yet. (no time)

It should  be very easy to write a small server (in java, or your favorite
language) that just responds with the given headers. Clearly it would have been
better if I had provided such a test case. 

I think I had indeed correctly identified a bug in mozilla 1.4alpha.

The bug in mozilla 1.4rc1 does not exist. I think the failure of mozilla to
refetch the page was simply due to it finding the page in my cache. By setting
my cache size to 0, the following conversation appears correctly:

GET /ebiz HTTP/1.1
Host: nlyehvgdc1ms045.gdc1.ce.philips.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://nlyehvgdc1ms047.gdc1.ce.philips.com/

HTTP/1.1 302 Object Moved
Location: http://nlyehvgdc1ms045.gdc1.ce.philips.com/ebiz/
Server: Microsoft-IIS/5.0
Content-Type: text/html
Content-Length: 171

<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a
HREF="http://nlyehvgdc1ms045.gdc1.ce.philips.com/ebiz/">here</a></body>GET
/ebiz/ HTTP/1.1
Host: nlyehvgdc1ms045.gdc1.ce.philips.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://nlyehvgdc1ms047.gdc1.ce.philips.com/

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Content-Location: http://nlyehvgdc1ms045.gdc1.ce.philips.com/ebiz/SCJavaLaunch.htm
Date: Tue, 03 Jun 2003 07:43:14 GMT
Content-Type: text/html
Accept-Ranges: bytes
Last-Modified: Tue, 03 Jun 2003 07:37:50 GMT
ETag: "e6f5109a329c31:920"
Content-Length: 1846

<script LANGUAGE="JavaScript">
  function clientWindow()
  {
    if ( self.history.length > 0 )
      self.history.back();

    var platform = navigator.platform.toLowerCase();
    var scjavaFile = 'scjava.htm';
    if ( platform.indexOf( 'macppc' ) != -1 )
      scjavaFile = 'scjavamac.htm';

    var winHeight = screen.availHeight - 90;
    var winWidth = screen.availWidth - 60;

    if ( navigator.appName.indexOf( 'etscape' ) != -1 )
    {
      var 
win=window.open(scjavaFile,'_blank','scrollbars=no,fullscreen=no,resizable=yes,toolbar=no,directories=no,location=no,status=no,menubar=no,outerWidth='+winWidth+',innerHeight='+winHeight+',screenX=30,screenY=30');
      win.moveTo(30,30);
      win.resizeTo(winWidth,winHeight);
    }
    else
    {
      var
win=window.open(scjavaFile,'_blank','scrollbars=no,fullscreen=no,resizable=yes,toolbar=no,directories=no,location=no,status=no,menubar=no');
      win.moveTo(30,30);
      win.resizeTo(winWidth,winHeight+30);
    }
  }
</script>

<html>

  <head>
    <title>Launch ServiceCenter 5.0 Java Client</title>
  </head>

  <body onload="clientWindow()">
    <div align="center">
      <br>
      <br>
      <br>
      <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"
size="6">Launching ServiceCenter 5.0 Java Client.</font><font size="6"><br>
        <NOSCRIPT>
          <p><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="4">
          This HTML page uses JavaScript. Please use a browser that<br>
          supports JavaScript, or enable JavaScript on your browser.</font></p>
        </NOSCRIPT>
      </font>
      <p><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">(You may
close this window at any time or leave it open for access to the Java
console.)</font></p>
    </div>
  </body>

</html>
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
VERIFIED:

Based on the data the problematic cache entry was probably a 302. You should
clear your cache.

I think bug 141702, the only change to 302 I could find, fixed this.

Rather than go through a cycle of reopen-spam, I'm just marking this a dupe.

I don't know if 302's should be read from cache or not.
Status: RESOLVED → VERIFIED
Depends on: 141702
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: