spdy: remove the restriction for HTTP method

This commit is contained in:
Andrey Uzunov
2013-08-11 21:54:12 +00:00
parent 4b0a8adbcc
commit c0f2ca60ba
-22
View File
@@ -155,28 +155,6 @@ spdy_handler_new_stream (void *cls,
return SPDY_YES;
}
//ignore everything but GET
if(strcasecmp("GET",method) && strcasecmp("POST",method))
{
SPDYF_DEBUG("received method '%s'", method);
static char * html = "Method not implemented. libmicrospdy supports now only GET.";
struct SPDY_Response *response = SPDY_build_response(501, NULL, SPDY_HTTP_VERSION_1_1, NULL, html, strlen(html));
if(NULL==response)
{
SPDY_destroy_request(request);
return SPDY_YES;
}
if(SPDY_YES != SPDY_queue_response(request, response, true, false, &spdy_callback_response_done, NULL))
{
SPDY_destroy_response(response);
SPDY_destroy_request(request);
}
//SPDY_destroy_request(request);
return SPDY_YES;
}
//call client's callback function to notify
daemon->new_request_cb(daemon->cls,