curl-users
Re: "HTTP error before end of send, stop sending" when redirecting to GET after POST
Date: Sun, 3 Mar 2019 12:07:30 -0500
> On Wed, 27 Feb 2019, Daniel Stenberg wrote:
>
> Found it, figured it out, wrote a patch that seems to fix it for me. Then made
> a PR out of it:
>
> https://github.com/curl/curl/pull/3624
Thanks!
I just tried it and it seemed to work.
$ src/curl http://localhost:8080/upload -F
"file=@/Users/matt/Downloads/test.txt" -H "Content-Type:
multipart/form-data" --trace-ascii -
== Info: Trying ::1...
== Info: TCP_NODELAY set
== Info: Connected to localhost (::1) port 8080 (#0)
=> Send header, 199 bytes (0xc7)
0000: POST /file HTTP/1.1
001a: Host: localhost:8080
0030: User-Agent: curl/7.64.1-DEV
004d: Accept: */*
005a: Content-Length: 195
006f: Content-Type: multipart/form-data; boundary=--------------------
00af: ----9b3de1ccc84a06fa
00c5:
=> Send data, 195 bytes (0xc3)
0000: --------------------------9b3de1ccc84a06fa
002c: Content-Disposition: form-data; name="file"; filename="test.
006c: txt"
0072: Content-Type: text/plain
008c:
008e: test.
0095: --------------------------9b3de1ccc84a06fa--
== Info: We are completely uploaded and fine
<= Recv header, 20 bytes (0x14)
0000: HTTP/1.1 302 Found
<= Recv header, 43 bytes (0x2b)
0000: Location: http://localhost:8080/upload
<= Recv header, 37 bytes (0x25)
0000: Date: Sun, 03 Mar 2019 17:03:48 GMT
<= Recv header, 19 bytes (0x13)
0000: Content-Length: 0
<= Recv header, 2 bytes (0x2)
0000:
== Info: Connection #0 to host localhost left intact
-- http://matthewlmcclure.com +1 617 329 1189 ----------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2019-03-03