[wp-trac] [WordPress Trac] #27498: Canonical redirect is applied upon POST request

WordPress Trac noreply at wordpress.org
Mon Mar 24 09:32:20 UTC 2014


#27498: Canonical redirect is applied upon POST request
--------------------------+-----------------------------
 Reporter:  c.axelsson    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Canonical     |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 If $_POST is empty a canonical redirect is still made even though it
 should be ignored upon all POST requests. As this redirect occurs before
 user have a chance to handle the request themselves in a template_redirect
 filter it prevents users to write proper REST APIs that include POST
 requests with no data.

 A patch that uses $_SERVER['REQUEST_METHOD'] instead of relying on the
 $_POST variable to identify request type is attached.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27498>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list