curl-library
Re: Getting multiple Host: headers
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Sun, 25 Jul 2004 00:12:14 +0200 (CEST)
Date: Sun, 25 Jul 2004 00:12:14 +0200 (CEST)
On Fri, 23 Jul 2004, Brian Akins wrote:
> Sure. See attached. It's a modified getmemory from examples.
Can you check if this patch makes it work for you?
diff -u -r1.238 http.c
--- lib/http.c 1 Jul 2004 07:30:19 -0000 1.238
+++ lib/http.c 24 Jul 2004 22:13:28 -0000
@@ -1374,6 +1374,10 @@
memcpy(conn->allocptr.cookiehost, start, len);
conn->allocptr.cookiehost[len]=0;
}
+
+ conn->allocptr.host = strdup(start);
+ if(!conn->allocptr.host)
+ return CURLE_OUT_OF_MEMORY;
}
else {
Curl_safefree(conn->allocptr.host);
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-07-25