aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-01-25 01:35:43 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-01-25 01:35:43 +0000
commit44ac2776ae8394974c88655c8c45ee4a6bf7b209 (patch)
tree391374bc62df04392e41426a0c4f01cac0f5a630
parent36e3e6ed16876c282268e808b48618b94cca09c4 (diff)
Fixed a dangling pointer problem that prevented the http_proxy environment
variable from being properly used in many cases (and caused test case 63 to fail).
-rw-r--r--CHANGES5
-rw-r--r--TODO-RELEASE3
-rw-r--r--lib/url.c5
-rwxr-xr-xtests/runtests.pl2
4 files changed, 9 insertions, 6 deletions
diff --git a/CHANGES b/CHANGES
index 8d529da00..888b417a9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,11 @@
Changelog
+Dan F (24 January 2007)
+- Fixed a dangling pointer problem that prevented the http_proxy environment
+ variable from being properly used in many cases (and caused test case 63
+ to fail).
+
Daniel (23 January 2007)
- David McCreedy did NTLM changes mainly for non-ASCII platforms:
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 468b7e3c2..acda7fdf8 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -4,9 +4,6 @@ To get fixed in 7.16.1 (planned release: January 2007)
69 - Jeff Pohlmeyer's curl_multi_socket crashing case. Recipe and instructions
here: http://curl.haxx.se/mail/lib-2007-01/0022.html
-77 - Dan Fandrich's HTTP proxy problem:
- http://curl.haxx.se/mail/lib-2007-01/0120.html
-
78 - HTTP Pipelining, NULL content
http://curl.haxx.se/bug/view.cgi?id=1631566
diff --git a/lib/url.c b/lib/url.c
index 91cb57e2e..01751a380 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3380,12 +3380,13 @@ else {
conn->proxy.name = conn->proxy.rawalloc;
free(proxydup); /* free the duplicate pointer and not the modified */
+ proxy = NULL; /* this may have just been freed */
if(!conn->proxy.rawalloc)
return CURLE_OUT_OF_MEMORY;
}
/*************************************************************
- * If the protcol is using SSL and HTTP proxy is used, we set
+ * If the protocol is using SSL and HTTP proxy is used, we set
* the tunnel_proxy bit.
*************************************************************/
if((conn->protocol&PROT_SSL) && conn->bits.httpproxy)
@@ -3831,7 +3832,7 @@ else {
/* set a pointer to the hostname we display */
fix_hostname(data, conn, &conn->host);
- if(!proxy || !*proxy) {
+ if(!conn->proxy.name || !*conn->proxy.name) {
/* If not connecting via a proxy, extract the port from the URL, if it is
* there, thus overriding any defaults that might have been set above. */
conn->port = conn->remote_port; /* it is the same port */
diff --git a/tests/runtests.pl b/tests/runtests.pl
index bc36a92cb..656316c25 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -1706,7 +1706,7 @@ sub singletest {
if($curl_debug) {
if(! -f $memdump) {
- logmsg "\n** ALERT! memory debuggin without any output file?\n";
+ logmsg "\n** ALERT! memory debugging without any output file?\n";
}
else {
my @memdata=`$memanalyze $memdump`;