mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-25 03:29:00 +08:00
Do not dealloc conn->request in mg_forward()
This commit is contained in:
parent
d4c8384b85
commit
0d9ecffc53
@ -4139,9 +4139,6 @@ int mg_forward(struct mg_connection *c, const char *host, int port, int ssl) {
|
||||
if (strcmp(c->request_method, "CONNECT") == 0) {
|
||||
// For CONNECT request, reply with 200 OK. Tunnel is established.
|
||||
mg_printf(c, "%s", "HTTP/1.1 200 OK\r\n\r\n");
|
||||
conn->request_len = 0;
|
||||
free(conn->request);
|
||||
conn->request = NULL;
|
||||
} else {
|
||||
// Strip "http://host:port" part from the URI
|
||||
if (memcmp(c->uri, "http://", 7) == 0) c->uri += 7;
|
||||
|
Loading…
Reference in New Issue
Block a user