curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: "HTTP error before end of send, stop sending" when redirecting to GET after POST

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 25 Feb 2019 16:43:46 +0100 (CET)

On Sun, 24 Feb 2019, Matt McClure wrote:

> I'm getting "HTTP error before end of send, stop sending" from curl when I
> upload a file to a server that redirects to GET after POST.

I've stared at your logs, the code and tried to reproduce this myself but I
haven't yet figured out why you get this.

> It seems to me that curl should be detecting that it has finished uploading
> the file instead of indicating that the response was received "before end of
> send".

Right, which it seems to do for me every time I issue a similar command. I
just can't trigger this problem! :-/

Now I've used a more recent curl version than you're using, but I can't recall
us having changed anything in this area for a long time...

> 0053: Content-Length: 191

...

> == Info: HTTP error before end of send, stop sending

Clearly the 'upload_done' field isn't set to TRUE there yet, which it is
supposed to do here:

https://github.com/curl/curl/blob/90236edee466b40fd1eb55f356d8fff30d5fba60/lib/transfer.c#L1205

> A benign info message that I can safely ignore?

All info messages are just there for info and thus benign. If it would be
truly bad, curl would return an error there.

-- 
  / daniel.haxx.se
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2019-02-25