cURL / Mailing Lists / curl-users / Single Mail


Strange problem with curl involving cookies and post data

From: Pieter Steyn <>
Date: Thu, 5 Mar 2009 14:36:37 +0200

Hi guys,

Could someone please tell me whats wrong with this:

I run it, and get no output at all, and the exit code is 0 ..but the
wget one gives me output:

curl -E usercert.pem:$PASS --key userkey.pem --pass 1234 --insecure -b
curlcookies.txt --data 'circuitNumber=number'

wget --private-key=userkey.pem --certificate=usercert.pem
--no-check-certificate --load-cookies cookies.txt --post-data

I need to use curl for this, because wget doesn't support ajax at all
and thus I don't get complete results in the html thats supposed to

Here is the curlcookies.txt and the cookies.txt (which I use for wget
and works):

# HTTP cookie file.
# Generated by Wget on 2009-03-05 12:47:14.
# Edit at your own risk. FALSE /cas TRUE 0 CASTGC blahblahblah

 Netscape HTTP Cookie File
# This file was generated by libcurl! Edit at your own risk. FALSE /cas TRUE 0 CASTGC blahblahblah FALSE /cas TRUE 10 userName FALSE /cas TRUE 10 password FALSE /cas TRUE 10 localUser

I don't understand why the wget one gives me output (although
incomplete because of the ajax, but the curl one gives me nothing.)

Hopefuly it's just a syntax / missing switch.

Oh, last bit of information, running the curl command with -v

This is interesting, but I'm not sure why it's happening:

> Host:
> Accept: */*
> Content-Length: 24
> Content-Type: application/x-www-form-urlencoded
< HTTP/1.1 302 Moved Temporarily
< Date: Thu, 05 Mar 2009 12:21:49 GMT
< Server: Apache
* Added cookie JSESSIONID="blahblah" for domain, path
/uniweb, expire 0
< Set-Cookie: JSESSIONID=blahblah; Path=/blah; Secure
< Location:
< Content-Length: 0
< Content-Type: text/plain
* Connection #0 to host left intact
* Closing connection #0

List admin:
Received on 2009-03-05