cURL / Mailing Lists / curl-users / Single Mail

curl-users

cURL POST issues

From: Ryan Hoffman <ryan__hoffman_at_hotmail.com>
Date: Mon, 18 Apr 2005 21:30:26 -0700

I'm also having issues with POST and cURL. I was hoping to use cURL to get
around similar POST issues with wget.

The following works in an IE browser, but not with cURL below...

http://walter.office.ccc.net/cgi-bin/search.cgi?q=dukesofhazzard&ps=20&o=0&m=all&wm=wrd&ul=&wf=222210

# curl -o test.htm -d q=dukesofhazzard -d ps=20 -d o=0 -d m=all -d wm=wrd -d
ul=222210 -d wf=222210 http://walter.office.ccc.net/cgi-bin/search.cgi

Frame 4 (426 on wire, 426 captured)
    Arrival Time: Apr 19, 2005 03:40:13.892743000
    Time delta from previous packet: 0.000898000 seconds
    Time relative to first packet: 0.016601000 seconds
    Frame Number: 4
    Packet Length: 426 bytes
    Capture Length: 426 bytes
Ethernet II
    Destination: 00:00:0c:07:ac:0f (Cisco_07:ac:0f)
    Source: 08:00:20:8f:84:78 (Sun_8f:84:78)
    Type: IP (0x0800)
Internet Protocol, Src Addr: bob, Dst Addr: walter.office.ccc.net
(172.31.4.95)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..0. = ECN-Capable Transport (ECT): 0
        .... ...0 = ECN-CE: 0
    Total Length: 412
    Identification: 0x4869
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: TCP (0x06)
    Header checksum: 0x6b7d (correct)
    Source: bob
    Destination: walter.office.ccc.net (172.31.4.95)
Transmission Control Protocol, Src Port: 36049 (36049), Dst Port: 80 (80),
Seq: 1225494144, Ack: 2006586731
    Source port: 36049 (36049)
    Destination port: 80 (80)
    Sequence number: 1225494144
    Next sequence number: 1225494516
    Acknowledgement number: 2006586731
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
        0... .... = Congestion Window Reduced (CWR): Not set
        .0.. .... = ECN-Echo: Not set
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 1... = Push: Set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 24820
    Checksum: 0xf340 (correct)
Hypertext Transfer Protocol
    POST /cgi-bin/search.cgi HTTP/1.1\r\n
    User-Agent: curl/7.11.0 (sparc-sun-solaris2.8) libcurl/7.11.0
OpenSSL/0.9.7d ipv6 zlib/1.1.3\r\n
    Host: walter.office.ccc.net\r\n
    Pragma: no-cache\r\n
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r\n
    Content-Length: 59\r\n
    Content-Type: application/x-www-form-urlencoded\r\n
    \r\n
    Data (59 bytes)

0000 00 00 0c 07 ac 0f 08 00 20 8f 84 78 08 00 45 00 ........ ..x..E.
0010 01 9c 48 69 40 00 40 06 6b 7d 77 88 11 22 ac 1f ..Hi@.@.k}..FE..
0020 04 5f 8c d1 00 50 49 0b 8e 80 77 9a 15 6b 50 18 ._...PI...w..kP.
0030 60 f4 f3 40 00 00 50 4f 53 54 20 2f 63 67 69 2d `..@..POST /cgi-
0040 62 69 6e 2f 73 65 61 72 63 68 2e 63 67 69 20 48 bin/search.cgi H
0050 54 54 50 2f 31 2e 31 0d 0a 55 73 65 72 2d 41 67 TTP/1.1..User-Ag
0060 65 6e 74 3a 20 63 75 72 6c 2f 37 2e 31 31 2e 30 ent: curl/7.11.0
0070 20 28 73 70 61 72 63 2d 73 75 6e 2d 73 6f 6c 61 (sparc-sun-sola
0080 72 69 73 32 2e 38 29 20 6c 69 62 63 75 72 6c 2f ris2.8) libcurl/
0090 37 2e 31 31 2e 30 20 4f 70 65 6e 53 53 4c 2f 30 7.11.0 OpenSSL/0
00a0 2e 39 2e 37 64 20 69 70 76 36 20 7a 6c 69 62 2f .9.7d ipv6 zlib/
00b0 31 2e 31 2e 33 0d 0a 48 6f 73 74 3a 20 77 61 6c 1.1.3..Host: wal
00c0 74 65 72 2e 6f 66 66 69 63 65 2e 63 63 63 2e 6e ter.office.ccc.n
00d0 65 74 0d 0a 50 72 61 67 6d 61 3a 20 6e 6f 2d 63 et..Pragma: no-c
00e0 61 63 68 65 0d 0a 41 63 63 65 70 74 3a 20 69 6d ache..Accept: im
00f0 61 67 65 2f 67 69 66 2c 20 69 6d 61 67 65 2f 78 age/gif, image/x
0100 2d 78 62 69 74 6d 61 70 2c 20 69 6d 61 67 65 2f -xbitmap, image/
0110 6a 70 65 67 2c 20 69 6d 61 67 65 2f 70 6a 70 65 jpeg, image/pjpe
0120 67 2c 20 2a 2f 2a 0d 0a 43 6f 6e 74 65 6e 74 2d g, */*..Content-
0130 4c 65 6e 67 74 68 3a 20 35 39 0d 0a 43 6f 6e 74 Length: 59..Cont
0140 65 6e 74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 ent-Type: applic
0150 61 74 69 6f 6e 2f 78 2d 77 77 77 2d 66 6f 72 6d ation/x-www-form
0160 2d 75 72 6c 65 6e 63 6f 64 65 64 0d 0a 0d 0a 71 -urlencoded....q
0170 3d 64 75 6b 65 73 6f 66 68 61 7a 7a 61 72 64 26 =dukesofhazzard&
0180 70 73 3d 32 30 26 6f 3d 30 26 6d 3d 61 6c 6c 26 ps=20&o=0&m=all&
0190 77 6d 3d 77 72 64 26 75 6c 3d 32 32 32 32 31 30 wm=wrd&ul=222210
01a0 26 77 66 3d 32 32 32 32 31 30 &wf=222210
Received on 2005-04-19