url variable modified in do_transparent_proxy() is not the url variable in the caller

This commit is contained in:
Mukund Sivaraman 2009-10-02 15:27:43 +05:30
parent 931b038b27
commit eab4ae000b

View File

@ -86,7 +86,9 @@ do_transparent_proxy (struct conn_s *connptr, hashmap_t hashofheaders,
request->path = (char *) safemalloc (ulen + 1);
strlcpy (request->path, url, ulen + 1);
safefree (url);
/* url overwritten by the call below is the url passed
* to this function, and is not the url variable in the
* caller. */
build_url (&url, request->host, request->port, request->path);
log_message (LOG_INFO,
"process_request: trans IP %s %s for %d",
@ -102,7 +104,9 @@ do_transparent_proxy (struct conn_s *connptr, hashmap_t hashofheaders,
request->path = (char *) safemalloc (ulen + 1);
strlcpy (request->path, url, ulen + 1);
safefree (url);
/* url overwritten by the call below is the url passed
* to this function, and is not the url variable in the
* caller. */
build_url (&url, request->host, request->port, request->path);
log_message (LOG_INFO,
"process_request: trans Host %s %s for %d",