Skip to content

Commit a920f9c

Browse files
committed
Ensure request_header is valid before test request method
1 parent a5a8d9f commit a920f9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/http_proxy_server_connection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ void http_proxy_server_connection::report_error(const std::string& status_code,
281281
this->modified_response_data += "\r\n";
282282
this->modified_response_data += "Proxy-Connection: close\r\n";
283283
this->modified_response_data += "\r\n";
284-
if (this->request_header->method() != "HEAD") {
284+
if (!this->request_header || this->request_header->method() != "HEAD") {
285285
this->modified_response_data += response_content;
286286
}
287287

0 commit comments

Comments
 (0)