cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Libcurl not redirecting.....

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 30 Apr 2010 08:51:11 +0200 (CEST)

On Thu, 29 Apr 2010, John Zadeh wrote:

> A comparison of my CURLOPT_WRITEHEADER output, with HTTP Live Headers,
> suggests that I am not being redirected from the main page. Perhaps,
> someone can help me out with this. I would appreciate it.

There is no HTTP redirect in the responses you showed. Is your browser perhaps
doing a HTML based or javascript based redirect?

> GET /wps/portal/personal HTTP/1.1

> Cookie: visitor_id=74.4.195.92.1271990209279159; survey=nosurvey;
> PORTAL51_JSESSIONID=0000MMoiMeDhQHJkDjpggboMHni:12kan52r1;
> Server_www.53.com_https=1890734808.47873.0000

Not that the first request you show already has a lot of cookies to send off.
You might need to do some request too before this to get (some of) those
cookies.

And it is a GET...

> curl_easy_setopt(curl, CURLOPT_URL, "https://www.53.com/wps/portal/personal");
>
> curl_easy_setopt(curl, CURLOPT_POSTFIELDS,
> "fp_browser=;fp_display=;fp_software=;fp_timezone=;fp_lang=;fp_syslang=;fp_userlang=;fp_cookie=;UserName=john&Password=kick&action=https://www.53.com/wps/portal/personal/servlet/logon");

... and this code implies a POST with this data, which isn't at all what the
log above showed.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-04-30