Closed
Bug 455854
Opened 17 years ago
Closed 17 years ago
eval, in javacript, when executed, causes a GET/POST request to the page being currently viewed
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: sinuousmail-bugzilla, Unassigned)
Details
Attachments
(1 file)
438 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
suppose the page is start.php which contains a script-X
"var dummy = eval ('some text')"
and suppose the page is called as follows
"GET /start.php"
The problem is that after the first "GET /start.php" request, as soon as the script-X is executed for the FIRST time, the browser resends the request "GET /start.php", even though the page is not reloaded or refreshed. NOTE that the contents of the page aren't refreshed , the browser only sends a request.
( Live HTTP headers was used to see these requests )
Also, even if the script-X is changed with another script-Y
"var dummy = eval('()');"
the behavior remains the same.
Reproducible: Always
Steps to Reproduce:
1.Create any page "start.php" with a script having eval function like
<script type="text/javascript">
var dummy = eval ('');
</script>
2. Open the page in the browser. Simultaneously, monitor the http requests being sent by the browser.
3.It'll be observed that "GET /start.php" is sent twice, even though the page is loaded only once. The first execution of any eval statement causes the page request to be sent again
Actual Results:
It'll be observed that "GET /start.php" is sent twice, even though the page is loaded only once. The first execution of any eval statement causes the page request to be sent again
Expected Results:
"GET /start.php"
should be sent only once.
I was using the default theme.
Reporter | ||
Comment 1•17 years ago
|
||
Try running the attached file from a server ( I used Apach 2.2.8 ) and also take a look at the browser requests simultaneously. It would be observed that after the first alert ( which is before the execution of the eval statement ), there is only one http-request, and after the second alert, there are two http-requests to the server.
Comment 2•17 years ago
|
||
Do you get the additional request if you run Firefox in the Firefox safemode (without addons) ?
http://kb.mozillazine.org/Safe_Mode
Reporter | ||
Comment 3•17 years ago
|
||
Thanks for the reply.
I just checked it up in safemode and there was no additional request. I'll now try to find the exact addon that causes the request to be sent again.
I apologize for bringing up a non-issue.
Thanks again !
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
Comment 4•17 years ago
|
||
I would guess either firebug or livehttpheaders.
They have to request a page again for some cases to get the headers.
This will be better in the future because recently a new API to get th headers got implemented in Gecko.
You need to log in
before you can comment on or make changes to this bug.
Description
•