diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-04-24 16:47:19 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-04-24 16:47:19 +0000 |
commit | 335d7870180970e123761eee5bbbcff044912925 (patch) | |
tree | 2467ac048c883bc30e75c2dd68c2a1667e89de48 | |
parent | 89ada2df2841db06ac71ea3a62ec6af0ea112a08 (diff) | |
download | tinyproxy-335d7870180970e123761eee5bbbcff044912925.tar.gz tinyproxy-335d7870180970e123761eee5bbbcff044912925.zip |
Fixed a couple of problems where tinyproxy was trying to free a memory
block which had not been allocated.
Also, the "proxy-connection" to the list of headers we don't pass.
-rw-r--r-- | src/reqs.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: reqs.c,v 1.64 2002-04-22 19:34:50 rjkaes Exp $ +/* $Id: reqs.c,v 1.65 2002-04-24 16:47:19 rjkaes Exp $ * * This is where all the work in tinyproxy is actually done. Incoming * connections have a new thread created for them. The thread then @@ -145,7 +145,7 @@ read_request_line(struct conn_s *connptr) log_message(LOG_ERR, "read_request_line: Client (file descriptor: %d) closed socket before read.", connptr->client_fd); - safefree(connptr->request_line); + return -1; } @@ -227,8 +227,10 @@ extract_http_url(const char *url, struct request_s *request) return 0; ERROR_EXIT: - safefree(request->host); - safefree(request->path); + if (request->host) + safefree(request->host); + if (request->path) + safefree(request->path); return -1; } @@ -799,6 +801,7 @@ process_server_headers(struct conn_s *connptr) "keep-alive", "proxy-authenticate", "proxy-authorization", + "proxy-connection", "transfer-encoding", }; |