cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: POST and persistant connections

From: Eric Rautman <erautman_at_email.com>
Date: Fri, 20 Apr 2001 18:13:44 -0400 (EDT)

just to follow up my previous post, tracing into url.c, line 1983, I found a
free() that deallocates the previous conn, causing the pointer to the
hostname to get hosed. Commenting this free() out removes the problem I
mentioned before, but introducing a memory leak is probably not the best
solution.

Since I have little time to research a better solution, I mention this here
in the hope that Daniel or someone with more experience with libcurl might
have time for a better fix.

Comments (and a fix?) appreciated,
Eric

------Original Message------
From: Eric Rautman <erautman_at_email.com>
To: libcurl Mailing list <curl-library_at_lists.sourceforge.net>
Sent: April 20, 2001 8:25:51 PM GMT
Subject: POST and persistant connections

I'm trying to post a form (CURLOPT_POST w/ CURLOPT_POSTFIELDS) twice using a
persistant connection. The first POST works fine, the second POST fails with
HTTP 400 (malformed host header.)

Turning on CURLOPT_VERBOSE, I see after the first POST that "Connection (#0)
left alive". On the second POST, I see "Re-using existing connection! (#0)".
OK so far. Then it prints the header, and I see that "Host:" is filled with
some garbage character, repeated over and over.

It makes no difference whether or not I reset CURLOPT_URL and
CURLOPT_POSTFIELDS before the second POST... same error.

Any ideas?

BTW I'm using libcurl 7.7.1 on WinNT (statically linked with my app), and my
server is Apache 1.3.12 (OpenSA/0.20)

Thanks,
Eric

-----------------------------------------------
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com

_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library

-----------------------------------------------
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com

_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-04-21