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

curl-and-php

Re: problem with & sign.

From: piotr maksymiuk <piotrek_at_net-line.pl>
Date: Fri, 23 May 2003 12:29:32 +0200

> > got a problem while using CURLOPT_CUSTOMREQUEST and using & sign within
my
> > request:
>
> I don't understand. Why are you using CURLOPT_CUSTOMREQUEST at all for a
> simple POST?

its not a regular POST, because i do not send any variable-value pairs.

the content of the request is xml code, which server receives and parses. as
far as i know (am i wrong?) i can only accomplish it by using custom
request.
it is not 'variable1=value1&variable2=value2' string, but appears that
either curl or the receiving server treats the & sign as the separator.

btw. customrequest is an answer to some other people, i've see a while ago,
asking how to solve such problem (sendind different content in http
request).

so i guess i'll have to snoop the transmission (which i would start with,
but can't ATM, so checking the mailing list :) ) to find out whether the
sign is sent right. and if it is, the problem is a receiver, which i can't
check too :)

> Of course, you say you CUSTOMREQUEST so I guess curl is issuing a toally
> weird request that might be confusing the server badly.

exactly, but the server is prepared and waiting for such :) and the only
problem is the '&'...

> > can i make it not to treat my request as url encoded or sth like that?
>
> curl doesn't care if you url encode it or not. It sends what you tell it
to,
> no matter how you encode it. The receiver of the data however, may not
like
> what it gets.

aah, so when i tell curl to send '<blabla> &&& </blabla>', the server will
receive exactly the same?
no transformations, encoding and stuff? plain text?

> > what shall i do for the above to work?
>
> Check the logs on the server side. :-)

yeah, gotta wait till monday for that :)

greetz.

--
pm
-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
Received on 2003-05-23