cURL / Mailing Lists / curl-library / Single Mail


Re: Problem: After execution of first curlPage, second url points to localhost

From: Daniel Stenberg <>
Date: Mon, 30 May 2005 23:45:50 +0200 (CEST)

On Mon, 30 May 2005, Leslie De Jesus wrote:

> First I do the login via an https address and it work perfectly, I get back
> the greeting that I get when succesfully login.
> Second I send another https url but this time it searches for the page in
> the localhost instead of the specified address. It substitutes
> https://www/ for http://localhost/XXXX
> Any ideas why this could be?

Because you re-used the memory for the URL before libcurl was done with it? Or
because you accidentally set a new URL?

Can you make a full C source example that repeats this problem?

> On another note, is there a way that I can refer to the session I started
> with the first post?

It depends on what a "session" is in your book. HTTP is stateless, libcurl
keeps connections alive, it does session ID caching for faster HTTPS
reconnects and it supports cookies fully.

> Not sure of the version of curl. When invoked by calling function
> curl_version() I received the string "Array".

That's not libcurl's curl_version() funciton, that's probably the PHP/CURL
function you're talking about. libcurl's curl_version() returns a pointer to a
zero terminated string.

> BTW, this tool is excellent!

I'm glad you like it.

  Commercial curl and libcurl Technical Support:
Received on 2005-05-30