[wp-trac] [WordPress Trac] #12529: Specify a response for more wp_die calls

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 5 18:55:43 UTC 2010


#12529: Specify a response for more wp_die calls
---------------------------+------------------------------------------------
 Reporter:  aaroncampbell  |       Owner:            
     Type:  defect (bug)   |      Status:  new       
 Priority:  normal         |   Milestone:  Unassigned
Component:  General        |     Version:            
 Severity:  normal         |    Keywords:            
---------------------------+------------------------------------------------

Comment(by aaroncampbell):

 I should have linked to the
 [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html HTTP Status Code
 Definitions].

 I'll start out by mentioning the ones that have been plaguing me most.  If
 you look at wp-comments-post.php, it gives the following error messages,
 all returning 500 status codes:

  * Sorry, comments are closed for this item.
    * I think this should return a 403
  * Sorry, you must be logged in to post a comment.
    * I think this should return a 401 Unauthorized
  * Error: please fill the required fields (name, email).
    * Honestly, I think this should return a 200.  It's an application
 error, but it seems like a 200 is appropriate.
  * Error: please enter a valid email address.
    * I think this should be a 200 as well.
  * Error: please type a comment.
    * It seems like this should also be a 200.

 I'm attaching a patch for the ones listed above.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12529#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list