weston-embedded/uC-HTTP

HTTPsConn_ErrInternal() sets the incorrect status code if the request isn't successfully parsed.

wes-jmagasrevy opened this issue · 0 comments

HTTPsConn_ErrInternal() currently handles HTTPs_ERR_FORM_APP_PARSE_FAULT the same it would an internal error. Handling it as a HTTPs_ERR_FORM_FORMAT_INV seems like the better (more meaningful) way since it will trigger a HTTP_STATUS_BAD_REQUEST (HTTP 400) status code instead of the generic HTTP 500 internal error status code. After all, HTTPs_ERR_FORM_APP_PARSE_FAULT is caused by the server finding something malformed or invalid in the form data sent in the request.