cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Content-type: application/x-amf

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 3 Mar 2008 13:28:40 -0800

On Mon, Mar 03, 2008 at 08:20:17PM +0100, Michael Hecker wrote:
> I want to receive data via curl, which normally a flash app receives from a
> server.
>
> Headers when using the flash app:
> [REQUEST HEADER]
>
> POST /abc/def.do HTTP/1.1
[...]
> Content-length: 61
[...]
> Headers when using my curl app:
> [REQUEST HEADER]
> 0| NAME: Request-Line | VAL.: POST /abc/def.do HTTP/1.1
[...]
> 12| NAME: Content-Length | VAL.: 64
[...]

> 1. Why is it a POST, if there is no data send by the client?

But there is data sent--61 bytes in the case of the flash app and 64 bytes
in the case of your app.

> 2. The Content-Length of the request header variies when I use the flash
> app. Can I somehow set the Content-Length of curl and ask curl to fill the
> content with blanks?

Yes, but that's almost guaranteed to be wrong. The remote server is likely
expecting very specific data, and your app should send that same data.
I don't know how you got your flash app logs, but you'll need to expand them
to show the actual data sent, too.

> 3. What exactly is application/x-amf?

If you don't know, then what are you going to do with the data once you get
it?

> 4. Why does my CURLOPT_WRITEDATA-struct receive no data?

CURLOPT_WRITEDATA is used to set a fixed value that is passed in to your
write callback function. When your write callback is called, the
CURLOPT_WRITEDATA value is passed in.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-03-03