cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: (no subject)

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 19 Dec 2003 08:54:23 +0100 (CET)

On Thu, 18 Dec 2003, Zhang, David wrote:

> curl -i -m 60 -A "user agent" -d 'form data' -H 'Referer: referred_url'
> -H 'Host: mysite.com:port' -H 'Connection: Keep-Alive' -H 'Cache-Control:
> no-cache' -H 'Cookie: mycookie' -b "mycookie" -e 'referred_url'
> https://mysite.com:port/myServlet

1. Using both "-H 'Referer:' _and_ -e seems unnecessary.

2. -H 'Host: mysite.com:port' is pointless since curl adds a host: header
   itself (extracted from the given URL)

3. -H 'Connection: Keep-Alive' makes no difference

4. -H 'Cache-Control: no-cache' ? You're not using a proxy here anyway...

5. -H 'Cookie: mycookie' _and_ -b "mycookie" seems odd.

> HTTP/1.1 400 Bad Request

The server deemed your request to be lacking something. I would guess that
when you put together the form data, you missed some field that the server
expected.

We could help you a lot easier if you showed us the <form> you're trying to
"fill in".

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-19