Closed Bug 270440 Opened 20 years ago Closed 19 years ago

XMLHttpRequest.send sends two requests?

Categories

(Core :: XML, defect)

1.0 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED EXPIRED

People

(Reporter: mrprogguy, Unassigned)

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

I wrote a previous and similar bug and erased it because of pilot error...but I 
fixed my mistake and now it's gotten weirder.

Loaded a page using a local webserver using 

http://192.168.1.39:8081/GetHTML?FilePath=c:\Test\xmlhttp.html

to avoid domain confusion regarding file:///c: vs. my actual IP address 
generating a permission denial.  I aggregated some form data into a URL string 
that starts with "http://192.168.1.39:8081/TestTrans?" and sent it with the send
() method.  The generated URL and data string are correct, and the server sees 
a CGI pass-through to the TestTrans transaction.  The response comes back to 
the web page, which updates a div via DOM with the expected content--and then a 
second transaction launches against GetHTML again, overwriting the original 
response. (I ran the server code in the debugger to verify this; I did data 
dumps to make sure I was seeing what I thought I was seeing.) In IE (using the 
Microsoft.XMLHTTP object) this doesn't happen.  I know I'm not making two trips 
through my script httpCallback() function because I'm alerted only once with 
the target URL string.  [There's no possibility that TestTrans() could force an 
echo to GetHTML() in the CGI server code.]  It's as if the browser decided it 
had to load the page again; the odd thing is that the second hit on GetHTML has 
the URL data sent with TestTrans--only the CGI function name was changed.

The Javascript console doesn't indicate any errors or exceptions.

Reproducible: Always
Steps to Reproduce:
1. Load a form page via CGI, using the address bar.
2. Use XMLHttpRequest to send back a CGI request via send() method, using a 
different request than the one that generated the page.
3. Wait.

Actual Results:  
Got back the response from step 2, and then a second response as if step 1 had 
been repeated with the wrong attached data.

Expected Results:  
Should have gotten back results from TestTrans CGI function only.

The web server code is our own, and hasn't shown any tendency to give false 
results in the eight years it's been deployed.  [Internally it isn't possible 
for TestTrans() to echo GetHTML().] I need to certify Firefox/Moz/et. al. for 
HTTP callback use on some major airline web check-in sites, pending some Q1 '05 
development which will require it, so this isn't a stopper at the moment.  I 
haven't yet ruled out an error on my part, but I'm running out of possible 
avenues of pursuit in that area.
After the second transaction, the address bar in Firefox is showing

http://192.168.1.39:8081/GetHTML?
field1=A+string+field&field2=394857&field3=3049%3B28+%24%24%
24&rad1=opt1&selector=sel1&otherselector=sel1

which certainly isn't what was intended.  Seems like an out-of-band request 
shouldn't generate a page reload.
Assignee: firefox → xml
Component: General → XML
Product: Firefox → Core
QA Contact: general → ashshbhatt
Version: unspecified → 1.0 Branch
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
You need to log in before you can comment on or make changes to this bug.