mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
[Issue #313] set method to ASCII "NULL" if evhttp_method() returns NULL
This commit is contained in:
parent
a69e4fadca
commit
17cc636223
5
http.c
5
http.c
@ -435,7 +435,10 @@ evhttp_make_header_request(struct evhttp_connection *evcon,
|
|||||||
evhttp_remove_header(req->output_headers, "Proxy-Connection");
|
evhttp_remove_header(req->output_headers, "Proxy-Connection");
|
||||||
|
|
||||||
/* Generate request line */
|
/* Generate request line */
|
||||||
method = evhttp_method(req->type);
|
if (!(method = evhttp_method(req->type))) {
|
||||||
|
method = "NULL";
|
||||||
|
}
|
||||||
|
|
||||||
evbuffer_add_printf(bufferevent_get_output(evcon->bufev),
|
evbuffer_add_printf(bufferevent_get_output(evcon->bufev),
|
||||||
"%s %s HTTP/%d.%d\r\n",
|
"%s %s HTTP/%d.%d\r\n",
|
||||||
method, req->uri, req->major, req->minor);
|
method, req->uri, req->major, req->minor);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user