cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

How to get a : into the http headers-wrong problem?

From: John Chelgren <jchelgren_at_groot.com>
Date: Wed, 27 Aug 2008 07:17:31 -0500

I question if this is the real problem. The ":" was ok for "Accept:" and for
"Content-Type:" so why is this the cause of a problem for "SOAPAction:".
When I research the SOAPAction header field spec, it indicates that the URI
should be a quoted string. Try reworking to get 'SOAPAction:
"http://www.foo.com/GetKey" '.

> I'm using curl 7.15.5 with php 4.4.4 and apache on debian linux.
> I need to do a post with a header line that contains a : (see the
> SOAPAction line).
> When I try to create it the : acts as a delimiter and chops off
> everything after it (I can see this with tcpdump).
> I can't seem to find a way around this. Is there one?
>
> $headers = array(
> "Accept: */*",
> "Content-Type: text/xml; charset=utf-8",
> "SOAPAction: http://www.foo.com/GetKey",
> "Connection: Keep-Alive",
> "Cache_Control: no-cache"
> );
> ...
>
> curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

I hope this fixes the problem.

John Chelgren jchelgren_at_groot.com

----- Original Message -----
From: <curl-and-php-request_at_cool.haxx.se>
To: <curl-and-php_at_cool.haxx.se>
Sent: Wednesday, August 27, 2008 05:00
Subject: curl-and-php Digest, Vol 36, Issue 9

> Send curl-and-php mailing list submissions to
> curl-and-php_at_cool.haxx.se
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
> or, via email, send a message with subject or body 'help' to
> curl-and-php-request_at_cool.haxx.se
>
> You can reach the person managing the list at
> curl-and-php-owner_at_cool.haxx.se
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of curl-and-php digest..."
>
>
> Today's Topics:
>
> 1. How to get a : into the http headers (Robert Brose)
> 2. Re: How to get a : into the http headers (Daniel Stenberg)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 26 Aug 2008 15:50:38 -0500 (CDT)
> From: Robert Brose <bob_at_jriver.com>
> Subject: How to get a : into the http headers
> To: curl-and-php_at_cool.haxx.se
> Message-ID: <20080826205038.4079.qmail_at_linux.jriver.com>
> Content-Type: text/plain; charset="US-ASCII"
>
> I'm using curl 7.15.5 with php 4.4.4 and apache on debian linux.
> I need to do a post with a header line that contains a : (see the
> SOAPAction line).
> When I try to create it the : acts as a delimiter and chops off
> everything after it (I can see this with tcpdump).
> I can't seem to find a way around this. Is there one?
>
> $headers = array(
> "Accept: */*",
> "Content-Type: text/xml; charset=utf-8",
> "SOAPAction: http://www.foo.com/GetKey",
> "Connection: Keep-Alive",
> "Cache_Control: no-cache"
> );
> ...
>
> curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
> ...
>
> Bob
>
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 26 Aug 2008 22:51:52 +0200 (CEST)
> From: Daniel Stenberg <daniel_at_haxx.se>
> Subject: Re: How to get a : into the http headers
> To: curl with PHP <curl-and-php_at_cool.haxx.se>
> Message-ID: <alpine.LRH.1.10.0808262250240.6487_at_yvahk3.pbagnpgbe.fr>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> On Tue, 26 Aug 2008, Robert Brose wrote:
>
>> I'm using curl 7.15.5 with php 4.4.4 and apache on debian linux. I need
>> to
>> do a post with a header line that contains a : (see the SOAPAction line).
>> When I try to create it the : acts as a delimiter and chops off
>> everything
>> after it (I can see this with tcpdump). I can't seem to find a way around
>> this. Is there one?
>
> I can't see anything in libcurl that would cut this off. Can the PHP/CURL
> module be to blame for this?
>
> libcurl 7.15.5 is very old and so seems php 4.4.4. Perhaps it works if you
> try
> more modern versions?
>
> --
>
> / daniel.haxx.se
>
>
> ------------------------------
>
> _______________________________________________
> curl-and-php mailing list
> curl-and-php_at_cool.haxx.se
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>
>
> End of curl-and-php Digest, Vol 36, Issue 9
> *******************************************

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-08-27