Feature #3541
open[http] Missing HTTP status
0%
Description
Hello,
As you know we created a REST API based on Wt. Today I was surprised to discover that when I emited a 409 (CONFLICT) status, it was turned into a 500 (INTERNAL SERVER ERROR) status.
The response I have :
HTTP/1.1 500 Internal Server Error
Date: Sat, 22 Aug 2014 15:31:11 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
I found this topic http://redmine.webtoolkit.eu/boards/2/topics/4852 where the same observation has been made.
The currently supported statuses are :
enum status_type
{
no_status = 0,
switching_protocols = 101,
ok = 200,
created = 201,
accepted = 202,
no_content = 204,
partial_content = 206,
multiple_choices = 300,
moved_permanently = 301,
found = 302,
see_other = 303,
not_modified = 304,
moved_temporarily = 307,
bad_request = 400,
unauthorized = 401,
forbidden = 403,
not_found = 404,
request_entity_too_large = 413,
requested_range_not_satisfiable = 416,
internal_server_error = 500,
not_implemented = 501,
bad_gateway = 502,
service_unavailable = 503
};
It should be : 100, 101, 200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, 305, 306, 307, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415 416, 417, 500, 501, 502, 503, 504, 505
It would be great to add those statuses to be able to use them :)
Do you want me to do it and make a pull request ?
Thank you,
Regards,
Thomas
Updated by Koen Deforche over 10 years ago
- Status changed from New to Feedback
Hey,
They keep on adding status code. So you yes, a pull request would certainly be considered for a merge.
Regards,
koen