curl-library
Header manipulation.
Date: Thu, 25 Jan 2001 04:31:57 -0800 (PST)
Hi,
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.
The XML-RPC spec currently states the following about the headers that need to be sent to the server:
*******************************************************
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).
Furthermore, the Content-Type must be text/xml and I do not know how to achieve this with the current options?.
Also, the Content-Length must be specified. Can I use the 'CURLOPT_INFILESIZE' option?.
The following is an example of a correctly formatted request with the header and payload for use with XML-RPC:
POST /RPC2 HTTP/1.0
User-Agent: Frontier/5.1.2 (WinNT)
Host: betty.userland.com
Content-Type: text/xml
Content-length: 181
<?xml version="1.0"?>
<methodCall> <methodName>examples.getStateName</methodName>
<params>
<param> <value><i4>41</i4></value> </param>
</params>
</methodCall>
Any help would be helpful, I'd really appreciate it!,
Jose' L. Landivar
_____________________________________________________________
PaloSanto.com - Innovating the Internet ---> http://www.palosanto.com
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-01-25