Haxx ad

curl's project page on


cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

RE: POST and persistant connections

From: Eric Rautman <>
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

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,

------Original Message------
From: Eric Rautman <>
To: libcurl Mailing list <>
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)


FREE! The World's Best Email Address
Reserve your name now at

Curl-library mailing list

FREE! The World's Best Email Address
Reserve your name now at

Curl-library mailing list
Received on 2001-04-21

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET