cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Header manipulation.

From: Matt Allen <matt_at_investigationmarketplace.com>
Date: Fri, 26 Jan 2001 00:55:56 +1100

Hey all.

it has been done !

I just got xml-rpx working over SSL with lib curl. its a bit of a dirty hack atm.

if anyone is interested in the code, drop me a line.

Matt

On Thu, Jan 25, 2001 at 02:06:37PM +0100, Daniel Stenberg wrote:
> On Thu, 25 Jan 2001, Jose Landivar wrote:
>
> > I am trying to get the XML-RPC spec implementation (www.xmlrpc.com) in
> > PHP to support HTTPS through the curl functions available. PHP has
> > support for the init, exec, etc. etc.. curl functions.
>
> Yes, so I've been told. ;-)
>
> > *******************************************************
> > Header requirements
> >
> > The format of the URI in the first line of the header is not specified.
> > For example, it could be empty, a single slash, if the server is only
> > handling XML-RPC calls. However, if the server is handling a mix of
> > incoming HTTP requests, we allow the URI to help route the request to the
> > code that handles XML-RPC requests. (In the example, the URI is /RPC2,
> > telling the server to route the request to the "RPC2" responder.)
> >
> > A User-Agent and Host must be specified.
> >
> > The Content-Type is text/xml.
> >
> > The Content-Length must be specified and must be correct.
> > *******************************************************
> >
> > Basically, User-Agent and Host must be specified. This could be dealt
> > with the 'CURLOPT_USERAGENT' and 'CURLOPT_REFERER' (I think).
>
> No. CURLOPT_USERAGENT sets user-agent all right, but Host: is automatically
> set correctly if you don't tamper with it yourself. CURLOPT_REFERER is for
> the referer field.
>
> > Furthermore, the Content-Type must be text/xml and I do not know how to
> > achieve this with the current options?.
>
> I really don't know how they offer this interface to PHP, but the standard
> libcurl has a CURLOPT_HTTPHEADER option that allows you to set a list of
> custom headers to include in the HTTP request. One of them could very well be
> "Content-Type: text/xml".
>
> > Also, the Content-Length must be specified. Can I use the
> > 'CURLOPT_INFILESIZE' option?.
>
> Just another header to set with CURLOPT_HTTPHEADER. Although a normal post
> operation using libcurl sets the Content-Length properly itself (.. which
> you override if you set the header yourself).
>
> > Any help would be helpful, I'd really appreciate it!,
>
> Just remember that libcurl is a general file transfer library and you're
> using the PHP-glue for it. I'm not fluent in PHP, I have not written the PHP
> layer and I don't know much about it (even though I now have that book Hughes
> Sterling wrote that includes curl-examples). So please have patience with me.
>
> --
> Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
>
>
>
>
> _______________________________________________
> Curl-library mailing list
> Curl-library_at_lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/curl-library

-- 
Matt Allen
Technical Director
Investigation Marketplace
0413 777 771
matt_at_investigationmarketplace.com
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-01-25