cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl issue...

From: bruce <badouglas_at_gmail.com>
Date: Sun, 3 Jul 2016 09:12:38 -0400

weirdness abounds..

wget -- this works.. consistently..

echo '' > a.lwp
wget -vvv --user-agent "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT
6.1; WOW64; Trident/5.0; chromeframe/12.0.742.112)" --cookies=on
--load-cookies=a.lwp --keep-session-cookies --save-cookies=a.lwp -O
- "http://www.bkstr.com"

wget -vvv --user-agent "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT
6.1; WOW64; Trident/5.0; chromeframe/12.0.742.112)" --cookies=on
--load-cookies=a.lwp --keep-session-cookies --save-cookies=a.lwp -O
- "
http://www.bkstr.com/webapp/wcs/stores/servlet/LocateCourseMaterialsServlet?requestType=INITIAL&storeId=432905&demoKey=d
"

curl -this hangs, it appears to be a cookie thing with the 1st/2nd curls
echo '' > a.lwp
curl -vvv -A "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
Firefox/38.0" --cookie-jar 'a.lwp' -L "http://www.bkstr.com"

curl -vvv -A "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
Firefox/38.0" --cookie a.lwp --cookie-jar a.lwp -L "
https://www.bkstr.com/webapp/wcs/stores/servlet/LocateCourseMaterialsServlet?requestType=INITIAL&storeId=432905&demoKey=d"

I've tested using single/double quotes around the curl file I've tested
using --cookie as well as --cookie-jar in both 1st and 2nd curls. It
appears to be a consistent issue with the server/curl generating the
cookies/string the returned cokies.

When I just test the 1st, I still don't get consistent cookies back.

Again, running the wget seems to cinsistently work with regards to the
cookie issue.

thoughts/comments..

On Sun, Jul 3, 2016 at 2:05 AM, Dan Fandrich <dan_at_coneharvesters.com> wrote:

> On Sat, Jul 02, 2016 at 06:55:46PM -0400, bruce wrote:
> > Oh...
> >
> > Forgot to post the issue.
> >
> > The 2nd curl hangs... and sometimes returns a server error.
>
> Assuming it works in a browser, try comparing the curl debug traces with
> those
> in a browser and see where they differ. You'll probably see some difference
> that ends up being important. For example, I see that the first URL is
> https:
> whereas the second two are http:; the cookies received in the first
> probably
> won't be sent in the second because of this.
>
> >>> Dan
> -------------------------------------------------------------------
> List admin: https://cool.haxx.se/list/listinfo/curl-users
> FAQ: https://curl.haxx.se/docs/faq.html
> Etiquette: https://curl.haxx.se/mail/etiquette.html
>

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ: https://curl.haxx.se/docs/faq.html
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-07-03