mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
spdy: remove the restriction for HTTP method
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user