Closed
Bug 297071
Opened 19 years ago
Closed 13 years ago
Firefox sends multiple requests on struts 1.2.4 - maybe because of some javascipt error
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: mark.breitner, Unassigned)
Details
(Keywords: qawanted)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Firefox sends multiple requests when being used together with Struts 1.2.4
(sending forms, using javascript:self.location etc.).
Instead of sending just one request it replicates every request
This may have to do with some javascript code we bought.
IE doesnt replicate the requests.
Reproducible: Sometimes
Steps to Reproduce:
This is difficult to describe because I think it is an error within javascript
that causes firefox to send multiple requests.
general :
1. start tomcat / struts
2. navigate to some site using this javascript
3. post request
Actual Results:
2 or more requests are being sent
Expected Results:
send only 1 request
Comment 1•19 years ago
|
||
Without a minimal testcase this isn't useful/fixable, like most bugs. If
javascript is used to submit the form when clicking a submit button, you
generally need to block the non-javascript submit action with a return false, etc.
I am able to reproduce this bug without Javascript enabled.
The Firefox seems to send two requests the difference between the two being the
On the first request the header is this
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
On the second request the header is this.
Accept: image/png,*/*;q=0.5
One more interesting observation is that, If the request is a post, then the
second request actually goes as a GET..
Attaching the livehttprequest trace along with this. note how the first one is
a POST and the second is a GET and also the second one does not contain the
parameters submitted. The same works perfectly in Opera and IE6.0 5.5 and 5.0
Further to the livehttpheader output, i am attaching the html which generated
the multiplerequests. the only difference being that this is was a jsp which
submitted to struts( java webframework) action.
Found out the problem...
I had a line of code in the output where the image src was set to empty.
<img src="" name="forward_blackimage" alt="" />
Now i expect that no image should be fetched, but our dear Firefox thinks that
it is the same as the requesting page and sends a request to the page once more.
I would log a seperate bug for this one.
Reporter | ||
Comment 6•19 years ago
|
||
I can state that the second (or third, or fourth...) request is actually a get
request.
We now avoid the problem by only sending post requests and filtering out all get
requests.
Maybe there is a src="" or something within the javascript code ... .
But anyway ... IE doesn´t reproduce the requests :(.
(In reply to comment #0)
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.8)
Gecko/20050511 Firefox/1.0.4
> Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.8)
Gecko/20050511 Firefox/1.0.4
>
> Firefox sends multiple requests when being used together with Struts 1.2.4
> (sending forms, using javascript:self.location etc.).
> Instead of sending just one request it replicates every request
>
> This may have to do with some javascript code we bought.
>
> IE doesnt replicate the requests.
>
> Reproducible: Sometimes
>
> Steps to Reproduce:
> This is difficult to describe because I think it is an error within javascript
> that causes firefox to send multiple requests.
>
> general :
>
> 1. start tomcat / struts
> 2. navigate to some site using this javascript
> 3. post request
> Actual Results:
> 2 or more requests are being sent
>
> Expected Results:
> send only 1 request
(In reply to comment #0)
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.8)
Gecko/20050511 Firefox/1.0.4
> Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.8)
Gecko/20050511 Firefox/1.0.4
>
> Firefox sends multiple requests when being used together with Struts 1.2.4
> (sending forms, using javascript:self.location etc.).
> Instead of sending just one request it replicates every request
>
> This may have to do with some javascript code we bought.
>
> IE doesnt replicate the requests.
>
> Reproducible: Sometimes
>
> Steps to Reproduce:
> This is difficult to describe because I think it is an error within javascript
> that causes firefox to send multiple requests.
>
> general :
>
> 1. start tomcat / struts
> 2. navigate to some site using this javascript
> 3. post request
> Actual Results:
> 2 or more requests are being sent
>
> Expected Results:
> send only 1 request
(In reply to comment #5)
> Found out the problem...
> I had a line of code in the output where the image src was set to empty.
> <img src="" name="forward_blackimage" alt="" />
> Now i expect that no image should be fetched, but our dear Firefox thinks that
> it is the same as the requesting page and sends a request to the page once more.
>
> I would log a seperate bug for this one.
Updated•18 years ago
|
Comment 7•13 years ago
|
||
we got never a testcase
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•