[wp-trac] [WordPress Trac] #62717: POST request to pages returns 200 or 404

WordPress Trac noreply at wordpress.org
Fri Dec 20 04:00:42 UTC 2024


#62717: POST request to pages returns 200 or 404
-------------------------------+------------------------------
 Reporter:  prestonwordsworth  |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  HTTP API           |     Version:  6.7.1
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by abcd95):

 Hey @prestonwordsworth, Thanks for bringing this up!

 While I would be able to suggest better if the data being sent was
 provided, with the information given, I can see that the behavior you're
 observing is the expected implementation.

 Empty POST requests are treated as GET requests, returning a 200 status
 with page content. When POST requests include data, WordPress attempts to
 find a registered handler for that data pattern. With a matching handler,
 it returns 200, otherwise 404.

 It's working as designed, though I agree with you that it could be better
 documented.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62717#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list