搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

POST action turns into a GET, which is incorrect.

  • 1 个回答
  • 1 人有此问题
  • 4 次查看
  • 最后回复者为 TyDraniu

more options

Using Apache2 to serve web pages.

Debian Linux 5.10.0-8-amd64 #1 SMP Debian 5.10.46-2 (2021-07-20) x86_64 GNU/Linux

The following appears in the access.log:-

127.0.0.1 - - [28/Jul/2021:15:17:42 +1000] "POST /scripts_php/memb_login.php HTTP/1.1" 302 314 "http://dev.webtest.info/htmlpages/login.html" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0" 127.0.0.1 - - [28/Jul/2021:15:17:42 +1000] "GET /scripts_php/memb_login.php HTTP/1.1" 200 499 "http://dev.webtest.info/htmlpages/login.html" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"

The form method is POST and the action is to call a PHP script which expects a POST array. The "302 314" appears to be correct, but, a GET is returned immediately.

According to w3.org:-

Note: RFC 1945 and RFC 2068 specify that the client is not allowed

     to change the method on the redirected request.  However, most
     existing user agent implementations treat 302 as if it were a 303
     response, performing a GET on the Location field-value regardless
     of the original request method. The status codes 303 and 307 have
     been added for servers that wish to make unambiguously clear which
     kind of reaction is expected of the client.

This has just started to occur after a recent upgrade to Firefox. It might be caused by the browser but there might be some other explanation or configuration setting that needs tweaking. Could somebody please help.

Thanks.

Using Apache2 to serve web pages. Debian Linux 5.10.0-8-amd64 #1 SMP Debian 5.10.46-2 (2021-07-20) x86_64 GNU/Linux The following appears in the access.log:- 127.0.0.1 - - [28/Jul/2021:15:17:42 +1000] "POST /scripts_php/memb_login.php HTTP/1.1" 302 314 "http://dev.webtest.info/htmlpages/login.html" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0" 127.0.0.1 - - [28/Jul/2021:15:17:42 +1000] "GET /scripts_php/memb_login.php HTTP/1.1" 200 499 "http://dev.webtest.info/htmlpages/login.html" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0" The form method is POST and the action is to call a PHP script which expects a POST array. The "302 314" appears to be correct, but, a GET is returned immediately. According to w3.org:- Note: RFC 1945 and RFC 2068 specify that the client is not allowed to change the method on the redirected request. However, most existing user agent implementations treat 302 as if it were a 303 response, performing a GET on the Location field-value regardless of the original request method. The status codes 303 and 307 have been added for servers that wish to make unambiguously clear which kind of reaction is expected of the client. This has just started to occur after a recent upgrade to Firefox. It might be caused by the browser but there might be some other explanation or configuration setting that needs tweaking. Could somebody please help. Thanks.

所有回复 (1)

more options

Hi, can you file a bug on https://bugzilla.mozilla.org/enter_bug.cgi ? Thanks.