From 0d9ecffc535745b60c6f5ac701f5ce72c63b7da6 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Sun, 3 Aug 2014 12:41:15 +0100 Subject: [PATCH] Do not dealloc conn->request in mg_forward() --- mongoose.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mongoose.c b/mongoose.c index 2149dddf..58a3402d 100644 --- a/mongoose.c +++ b/mongoose.c @@ -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;