shttpd doesn't support the "Expect: 100 Continue" request header,
rendering it non-functional for multipart/form-data requests on
most clients because the request body is lost.
Two Curl logs attached: one showing the correct behaviour
with Apache httpd, one showing shttpd behaviour.
Leslie
--
LinkedIn Profile: http://www.linkedin.com/in/polzer
Xing Profile: https://www.xing.com/profile/LeslieP_Polzer
Blog: http://blog.viridian-project.de/
% curl --trace - http://localhost:80/phpinfo.php -F test=foo
== Info: About to connect() to localhost port 80 (#0)
== Info: Trying 127.0.0.1... == Info: connected
== Info: Connected to localhost (127.0.0.1) port 80 (#0)
=> Send header, 277 bytes (0x115)
0000: 50 4f 53 54 20 2f 70 68 70 69 6e 66 6f 2e 70 68 POST /phpinfo.ph
0010: 70 20 48 54 54 50 2f 31 2e 31 0d 0a 55 73 65 72 p HTTP/1.1..User
0020: 2d 41 67 65 6e 74 3a 20 63 75 72 6c 2f 37 2e 31 -Agent: curl/7.1
0030: 38 2e 32 20 28 69 36 38 36 2d 70 63 2d 6c 69 6e 8.2 (i686-pc-lin
0040: 75 78 2d 67 6e 75 29 20 6c 69 62 63 75 72 6c 2f ux-gnu) libcurl/
0050: 37 2e 31 38 2e 32 20 4f 70 65 6e 53 53 4c 2f 30 7.18.2 OpenSSL/0
0060: 2e 39 2e 38 69 20 7a 6c 69 62 2f 31 2e 32 2e 33 .9.8i zlib/1.2.3
0070: 2e 33 0d 0a 48 6f 73 74 3a 20 6c 6f 63 61 6c 68 .3..Host: localh
0080: 6f 73 74 0d 0a 41 63 63 65 70 74 3a 20 2a 2f 2a ost..Accept: */*
0090: 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 ..Content-Length
00a0: 3a 20 31 34 32 0d 0a 45 78 70 65 63 74 3a 20 31 : 142..Expect: 1
00b0: 30 30 2d 63 6f 6e 74 69 6e 75 65 0d 0a 43 6f 6e 00-continue..Con
00c0: 74 65 6e 74 2d 54 79 70 65 3a 20 6d 75 6c 74 69 tent-Type: multi
00d0: 70 61 72 74 2f 66 6f 72 6d 2d 64 61 74 61 3b 20 part/form-data;
00e0: 62 6f 75 6e 64 61 72 79 3d 2d 2d 2d 2d 2d 2d 2d boundary=-------
00f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0100: 2d 2d 2d 2d 2d 34 63 65 35 38 65 63 32 34 36 63 -----4ce58ec246c
0110: 37 0d 0a 0d 0a 7....
<= Recv header, 23 bytes (0x17)
0000: 48 54 54 50 2f 31 2e 31 20 31 30 30 20 43 6f 6e HTTP/1.1 100 Con
0010: 74 69 6e 75 65 0d 0a tinue..
=> Send data, 142 bytes (0x8e)
0000: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0010: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 34 63 --------------4c
0020: 65 35 38 65 63 32 34 36 63 37 0d 0a 43 6f 6e 74 e58ec246c7..Cont
0030: 65 6e 74 2d 44 69 73 70 6f 73 69 74 69 6f 6e 3a ent-Disposition:
0040: 20 66 6f 72 6d 2d 64 61 74 61 3b 20 6e 61 6d 65 form-data; name
0050: 3d 22 74 65 73 74 22 0d 0a 0d 0a 66 6f 6f 0d 0a ="test"....foo..
0060: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0070: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 34 63 --------------4c
0080: 65 35 38 65 63 32 34 36 63 37 2d 2d 0d 0a e58ec246c7--..
<= Recv header, 17 bytes (0x11)
0000: 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d HTTP/1.1 200 OK.
0010: 0a .
[...]
% curl -v --trace - http://localhost:7890/phpinfo.php -F test=foo
Warning: --trace overrides an earlier trace/verbose option
== Info: About to connect() to localhost port 7890 (#0)
== Info: Trying 127.0.0.1... == Info: connected
== Info: Connected to localhost (127.0.0.1) port 7890 (#0)
=> Send header, 282 bytes (0x11a)
0000: 50 4f 53 54 20 2f 70 68 70 69 6e 66 6f 2e 70 68 POST /phpinfo.ph
0010: 70 20 48 54 54 50 2f 31 2e 31 0d 0a 55 73 65 72 p HTTP/1.1..User
0020: 2d 41 67 65 6e 74 3a 20 63 75 72 6c 2f 37 2e 31 -Agent: curl/7.1
0030: 38 2e 32 20 28 69 36 38 36 2d 70 63 2d 6c 69 6e 8.2 (i686-pc-lin
0040: 75 78 2d 67 6e 75 29 20 6c 69 62 63 75 72 6c 2f ux-gnu) libcurl/
0050: 37 2e 31 38 2e 32 20 4f 70 65 6e 53 53 4c 2f 30 7.18.2 OpenSSL/0
0060: 2e 39 2e 38 69 20 7a 6c 69 62 2f 31 2e 32 2e 33 .9.8i zlib/1.2.3
0070: 2e 33 0d 0a 48 6f 73 74 3a 20 6c 6f 63 61 6c 68 .3..Host: localh
0080: 6f 73 74 3a 37 38 39 30 0d 0a 41 63 63 65 70 74 ost:7890..Accept
0090: 3a 20 2a 2f 2a 0d 0a 43 6f 6e 74 65 6e 74 2d 4c : */*..Content-L
00a0: 65 6e 67 74 68 3a 20 31 34 32 0d 0a 45 78 70 65 ength: 142..Expe
00b0: 63 74 3a 20 31 30 30 2d 63 6f 6e 74 69 6e 75 65 ct: 100-continue
00c0: 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 ..Content-Type:
00d0: 6d 75 6c 74 69 70 61 72 74 2f 66 6f 72 6d 2d 64 multipart/form-d
00e0: 61 74 61 3b 20 62 6f 75 6e 64 61 72 79 3d 2d 2d ata; boundary=--
00f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0100: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 61 35 64 63 36 37 ----------a5dc67
0110: 31 34 37 63 62 62 0d 0a 0d 0a 147cbb....
<= Recv header, 17 bytes (0x11)
0000: 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d HTTP/1.1 200 OK.
0010: 0a .
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
shttpd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shttpd-general