Bug 8051 - Empty forms are submitted incorrectly
Summary: Empty forms are submitted incorrectly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Alexey Proskuryakov
URL: http://vesna.yandex.ru/cgi-bin/vesna
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-29 05:09 PST by Alexey Proskuryakov
Modified: 2013-09-25 15:55 PDT (History)
2 users (show)

See Also:


Attachments
proposed fix (1.91 KB, patch)
2006-03-30 09:09 PST, Alexey Proskuryakov
sullivan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2006-03-29 05:09:18 PST
Pressing the button at <http://vesna.yandex.ru/cgi-bin/vesna> should each time result in new random text being displayed. This doesn't work if one is behind a caching proxy, because the server sends no proxy control HTTP headers, and the URL is always the same in Safari.

Firefox and WinIE correctly append a question mark to the URL when submitting the form, which avoids caching: <http://vesna.yandex.ru/cgi-bin/vesna?>.

<form name="filo" method="get" action="/cgi-bin/vesna">
<input type="submit" value="Continue"/>
</form>
Comment 1 Alexey Proskuryakov 2006-03-30 09:09:24 PST
Created attachment 7393 [details]
proposed fix
Comment 2 Erik Arvidsson 2009-10-06 09:02:46 PDT
Firefox 3.5.3 does not add the ? when the form has no form data.

https://dl.getdropbox.com/u/182043/tests/form-action-anchor2.html

Maybe they changed since this bug is pretty old.

The reason why I am bring this up again is that this is one of the reasons for bug 20342. That test submits to a fragment (#a) with an empty form but since a '?' is added the URL is not the same and therefore reloads from the server making which causes the test to infinitely reload. (There are more problems with that layout test.)
Comment 3 Victor Costan 2013-09-25 15:55:58 PDT
IE9 does the same thing as Firefox.  However, the WebKit behavior follows standards. I will add a longer comment explaining my interpretation of the standards to a bug that basically asks to get this change reverted.

https://bugs.webkit.org/show_bug.cgi?id=30103