- IIS7 refuses chunked-encoded file upload
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf8" />
- </head>
- <body>
- <form method="post" enctype="multipart/form-data">
- File: <input type="file" name="upfile" />
- <input type="submit" value="go"/>
- </form>
- </body>
- </html>
- curl.exe http://serveur/test.php --form "upfile=@text.txt"
- -H "Transfer-Encoding: chunked" -H "Expect:"
- POST http://serveur/test.php HTTP/1.1
- User-Agent: curl/7.15.3 (i586-pc-mingw32msvc) libcurl/7.15.3 zlib/1.2.2
- Host: serveur
- Pragma: no-cache
- Accept: */*
- Connection: Keep-Alive
- Transfer-Encoding: chunked
- Content-Type: multipart/form-data; boundary=----------------------------310dbcc6761b
- 8c
- ------------------------------310dbcc6761b
- Content-Disposition: form-data; name="upfile"; filename="text.txt"
- Content-Type: text/plain
- 5
- hello
- 30
- ------------------------------310dbcc6761b--
- 0
- POST http://serveur/test.php HTTP/1.1
- User-Agent: curl/7.15.3 (i586-pc-mingw32msvc) libcurl/7.15.3 zlib/1.2.2
- Host: serveur
- Pragma: no-cache
- Accept: */*
- Connection: Keep-Alive
- Content-Length: 193
- Content-Type: multipart/form-data; boundary=----------------------------e2d761bc173a
- ------------------------------e2d761bc173a
- Content-Disposition: form-data; name="upfile"; filename="text.txt"
- Content-Type: text/plain
- hello
- ------------------------------e2d761bc173a--
- HTTP/1.1 200 OK
- Content-Type: text/html
- Server: Microsoft-IIS/7.5
- X-Powered-By: PHP/5.3.8
- X-Powered-By: ASP.NET
- Date: Mon, 21 Nov 2011 10:47:57 GMT
- Content-Length: 272
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf8" />
- </head>
- <body>
- <form method="post" enctype="multipart/form-data">
- File: <input type="file" name="upfile" />
- <input type="submit" value="go"/>
- </form>
- </body>
- </html>
- C:...inetsrv>appcmd.exe set config /section:asp /enableChunkedEncoding:True
- Applied configuration changes to section "system.webServer/asp" for "MACHINE/
- WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
- 5
- hello
- 5
- h ello