curl-users
Re: http post without headers
Date: Tue, 23 Jul 2002 03:23:38 -0500
You need to know exactly what headers are being sent. Once you know that, you
can cancel each header with the --header option to curl:
from the curl manpage:
-H/--header <header>
...snip... Replacing an internal header with one without content on
the right side of the colon will prevent that header from appearing.
So, to cancel the "Host:" header, add this option:
-H "Host:"
and so on. Can't really get more specific than that, because your milage may
vary. For instance, the proxy I have to use at work inserts "Via:" and
"X-Forwarded-For:" headers, and you probably don't have to worry about those.
Actually, I probably couldn't cancel the "Via" and "X-Forwarded-For:" headers
anyway, because the proxy inserts them *after* curl sends the request... If
you've got anything like that between you and the server/servlet, you may be
dead in the water...
Ralph Mitchell
nil wrote:
> Hi
> I'm new with curl
>
> I would like to post an XML message to a servlet that has to receive only the
> XML message and nothing else.
> The servlet doesn't read anything if there is a header.
> Is it possible to http post my message with no header at all to my servlet ?
> If yes, How & Could you give me an example ?
>
> Thank you :)
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-07-23