From 17cc6362239469638a4afc971314ab12ad4ea624 Mon Sep 17 00:00:00 2001 From: Mark Ellzey Date: Fri, 24 Jun 2016 18:07:39 -0700 Subject: [PATCH] [Issue #313] set method to ASCII "NULL" if evhttp_method() returns NULL --- http.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/http.c b/http.c index 610d0f9c..d3c79f82 100644 --- a/http.c +++ b/http.c @@ -435,7 +435,10 @@ evhttp_make_header_request(struct evhttp_connection *evcon, evhttp_remove_header(req->output_headers, "Proxy-Connection"); /* Generate request line */ - method = evhttp_method(req->type); + if (!(method = evhttp_method(req->type))) { + method = "NULL"; + } + evbuffer_add_printf(bufferevent_get_output(evcon->bufev), "%s %s HTTP/%d.%d\r\n", method, req->uri, req->major, req->minor); -- 2.40.0