[wp-trac] [WordPress Trac] #47393: Comment form submission with invalid fields incorrectly returns 200 OK response
WordPress Trac
noreply at wordpress.org
Sun May 26 19:32:32 UTC 2019
#47393: Comment form submission with invalid fields incorrectly returns 200 OK
response
--------------------------+------------------------------
Reporter: westonruter | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 4.1
Severity: normal | Resolution:
Keywords: has-patch | Focuses: rest-api
--------------------------+------------------------------
Comment (by westonruter):
Replying to [comment:2 miqrogroove]:
> Code 400 signifies a malformed HTTP header that the server cannot
process. I would never use this for form validation except where the
payload is missing or cannot be parsed at all.
Then why does the WordPress REST API use the 400 response code for invalid
comment requests?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47393#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list