Closed
Bug 72491
Opened 25 years ago
Closed 25 years ago
POSTing form with a target causes a GET after POST
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.9
People
(Reporter: rdunce, Assigned: adamlock)
References
Details
(Keywords: testcase)
Attachments
(3 files)
|
200 bytes,
text/html
|
Details | |
|
197 bytes,
patch
|
Details | Diff | Splinter Review | |
|
4.52 KB,
patch
|
Details | Diff | Splinter Review |
POSTing data from a form with a target that causes a new window to pop up sends
a GET after the POST operation. Should only be a POST, not a POST then a GET.
Only happens when a new window is opened as a result of submitting the form with
the method set to POST.
Updated•25 years ago
|
Assignee: rods → pollmann
Comment 1•25 years ago
|
||
reassigning
Comment 2•25 years ago
|
||
Roger, what build are you using? This was bug 41241, which was fixed on Feb 5...
| Reporter | ||
Comment 3•25 years ago
|
||
Build ID: 2001030608
| Reporter | ||
Comment 4•25 years ago
|
||
Tried it with :
Mozilla/5.0 (X11; U; Linux 2.2.18 i686; en-US; 0.8.1) Gecko/20010319
and does the same thing. POST then a GET.
Comment 5•25 years ago
|
||
status to new to get this looked at.
Does the get send the form data, or no? (I presume it does not. If it does
not, this should have the dataloss keyword)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 6•25 years ago
|
||
Not seeing this on yesterday's build 0320 for Windows NT or Linux. Reporter, can
you provide more detail on how to reproduce this bug, (e.g. a test case).
I tested this with the first testcase on bug 41241.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
| Reporter | ||
Comment 7•25 years ago
|
||
I noticed this when developing some JSP pages using tomcat and struts. When
looking at the servlet logs I noticed the POST and GET. I tried it with IE5,
Netscape 4.7x on Linux and Windows 2000 as well as Opera and they all produce
the logs i was expecting.
I used you test case as it was with the target as "_blank" and it came back with
a method of POST. However...I modified your test case by changing the target to
target="newwindow" with no window called "newwindow" present so it would have to
be created and it came back with a request method of "GET". If i immediately
click the submit button again (i.e The window "newwindow" has been created
already and is being displayed) it comes back with a method of POST.
It seems to me that when it's not one of the '_' windows(_blank etc) but a named
window that doesn't exist that the method of GET comes back.
test.html:
<body>
<form target="newwindow" action="http://pollmann.net/echo.cgi" method="post">
<input type=submit name=sub value=mit>
</form>
</body>
Comment 8•25 years ago
|
||
Reopening. The fix to bug 41241 special-cases _blank and _new. Other named
targets still don't work.
Comment 9•25 years ago
|
||
Comment 10•25 years ago
|
||
reassigning to owner of bug 41241
| Assignee | ||
Comment 11•25 years ago
|
||
| Assignee | ||
Comment 12•25 years ago
|
||
| Assignee | ||
Comment 13•25 years ago
|
||
I have updated the patch I checked in for GET/POST problems with _new and _blank
windows. The new version moves the window opening code to slightly lower down in
the nsURILoader::GetTarget routine.
Now, if the target is "_blank", "_new", or if the named window cannot be found,
the code will create the window and return the window context for the new window
to the caller. This causes the POST data to be fed directly into the new window
rather than being thrown away with a bogus GET operation being submitted later
on.
Please try this patch out and append comments.
Readers of bug 41241 should post their comments here.
Depends on: 41241
| Assignee | ||
Comment 14•25 years ago
|
||
Setting target milestone to 0.9
Keywords: mozilla0.9.1 → mozilla0.9
Target Milestone: --- → mozilla0.9
| Reporter | ||
Comment 15•25 years ago
|
||
Tested on Linux x86 and it seems to have solved to the problem I was encountering.
Comment 16•25 years ago
|
||
looks good. sr=mscott
| Assignee | ||
Comment 17•25 years ago
|
||
Thanks Scott, fix is checked in.
Status: NEW → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Comment 18•25 years ago
|
||
Verifying on build 2001-04-10-04-trunk Windows 98
Status: RESOLVED → VERIFIED
Comment 19•25 years ago
|
||
*** Bug 80954 has been marked as a duplicate of this bug. ***
Updated•7 years ago
|
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•