mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
Bugfix for Post method not allowed.
This commit is contained in:
parent
91dd236c55
commit
4432a2e551
@ -50,10 +50,9 @@ extern const char* header_delimiter;
|
|||||||
/*HTTP method types*/
|
/*HTTP method types*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
HTTP_METHOD_GET = (1 << 0),
|
HTTP_METHOD_GET = (1 << 0),
|
||||||
HTTP_METHOD_HEAD = (1 << 1),
|
HTTP_METHOD_POST = (1 << 1),
|
||||||
HTTP_METHOD_POST = (1 << 2),
|
HTTP_METHOD_PUT = (1 << 2),
|
||||||
HTTP_METHOD_PUT = (1 << 3),
|
HTTP_METHOD_DELETE = (1 << 3)
|
||||||
HTTP_METHOD_DELETE = (1 << 4)
|
|
||||||
} http_method_t;
|
} http_method_t;
|
||||||
|
|
||||||
//DY : FIXME right now same enum names with COAP with different values. Will this work fine?
|
//DY : FIXME right now same enum names with COAP with different values. Will this work fine?
|
||||||
|
@ -235,8 +235,6 @@ is_method_handled(connection_state_t* conn_state, const char* method)
|
|||||||
/*other method types can be added here if needed*/
|
/*other method types can be added here if needed*/
|
||||||
if(strncmp(method, http_get_string, 3) == 0) {
|
if(strncmp(method, http_get_string, 3) == 0) {
|
||||||
conn_state->request.request_type = HTTP_METHOD_GET;
|
conn_state->request.request_type = HTTP_METHOD_GET;
|
||||||
} else if(strncmp(method, http_head_string, 4) == 0) {
|
|
||||||
conn_state->request.request_type = HTTP_METHOD_HEAD;
|
|
||||||
} else if (strncmp(method, http_post_string, 4) == 0) {
|
} else if (strncmp(method, http_post_string, 4) == 0) {
|
||||||
conn_state->request.request_type = HTTP_METHOD_POST;
|
conn_state->request.request_type = HTTP_METHOD_POST;
|
||||||
} else if (strncmp(method, http_put_string, 3) == 0) {
|
} else if (strncmp(method, http_put_string, 3) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user