cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Content-type: application/x-amf

From: Michael Hecker <Hecker.Michael_at_gmx.de>
Date: Tue, 04 Mar 2008 01:31:33 +0100

Dan Fandrich schrieb:
> 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.
>
I'm using HTTPAnalyzerFullV2 to log the traffic, but I think this is not
the best idea, because this programm doen't display the actual post data
in this special case.
I will try it to get more information with wireshark tomorrow.
>
>> 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
>>>>

Michael
Received on 2008-03-04