cURL / Mailing Lists / curl-library / Single Mail

curl-library

Content-type: application/x-amf

From: Michael Hecker <Hecker.Michael_at_gmx.de>
Date: Mon, 03 Mar 2008 20:20:17 +0100

Hello,
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
Host: www.xyz.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.12)
Gecko/20080201 Firefox/2.0.0.12
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: [some cookies]
Referer: [some referer]
Content-type: application/x-amf
Content-length: 61

[RESPONSE HEADER]
HTTP/1.1 200 OK
Date: Mon, 03 Mar 2008 18:51:45 GMT
Server: Apache
X-Powered-By: Servlet/2.4 JSP/2.0
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/x-amf

a
<

Headers when using my curl app:
[REQUEST HEADER]
0| NAME: Request-Line | VAL.: POST /abc/def.do HTTP/1.1
1| NAME: User-Agent | VAL.: Mozilla/5.0 (Windows; U; Windows NT 5.1; de;
rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
2| NAME: Host | VAL.: www.xyz.com
3| NAME: Accept-Encoding | VAL.: gzip,deflate
4| NAME: Cookie | VAL.: [some cookies]
5| NAME: Accept | VAL.:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
6| NAME: Accept-Language | VAL.: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
7| NAME: Accept-Charset | VAL.: ISO-8859-1,utf-8;q=0.7,*;q=0.7
8| NAME: Keep-Alive | VAL.: 300
9| NAME: Connection | VAL.: keep-alive
10| NAME: Content-type | VAL.: application/x-amf
11| NAME: Referer | VAL.: [some referer]
12| NAME: Content-Length | VAL.: 64

[RESPONSE HEADER]
0| NAME: Status-Line | VAL.: HTTP/1.1 200 OK
1| NAME: Date | VAL.: Mon, 03 Mar 2008 19:03:30 GMT
2| NAME: Server | VAL.: Apache
3| NAME: Set-Cookie | VAL.: Apache=77.1.147.253.1204571010285351;
path=/; expires=Thu, 01-Mar-18 19:03:30 GMT
4| NAME: X-Powered-By | VAL.: Servlet/2.4 JSP/2.0
5| NAME: Vary | VAL.: Accept-Encoding,User-Agent
6| NAME: Content-Encoding | VAL.: gzip
7| NAME: Content-Length | VAL.: 20
8| NAME: Keep-Alive | VAL.: timeout=15, max=100
9| NAME: Connection | VAL.: Keep-Alive
10| NAME: Content-Type | VAL.: text/html; charset=ISO-8859-1

1. Why is it a POST, if there is no data send by the client?
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?
3. What exactly is application/x-amf?
4. Why does my CURLOPT_WRITEDATA-struct receive no data?

Thanks,
Michael
Received on 2008-03-03