curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: POST with string body is failing on Windows

From: Michael Ost via curl-library <curl-library_at_lists.haxx.se>
Date: Thu, 10 Feb 2022 18:43:22 +0000

Daniel,

You are my hero! You identified the problem. Our library was appending CRLF to the token on Windows, making the header incorrect. I’ve been staring at that line in the logs feeling something wasn’t right, but not quite identifying the difference. Thanks!

/M

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wednesday, February 9, 2022 at 11:33 PM
To: Michael Ost via curl-library <curl-library_at_lists.haxx.se>
Cc: Michael Ost <michael.ost_at_avid.com>, Stephen Wilson <stephen.wilson_at_avid.com>, Kenley Malveaux <kenley.malveaux_at_avid.com>
Subject: Re: POST with string body is failing on Windows
WARNING: EXTERNAL EMAIL

On Thu, 10 Feb 2022, Michael Ost via curl-library wrote:

> Accept-Encoding: identity
> Authorization: Bearer MDA***********************
>
> User-Agent: avid-ptc-google-analytics
> Content-type: text/plain
> Content-Length: 522

Based on the little gap there, I assume that the Bearer token you pass in has
a trailng newline, which makes the outgoing request "broken". The
Content-Length ends up on the other side of the first crlf+crlf and thus isn't
seen by the server.

--
/ daniel.haxx.se
| Commercial curl support up to 24x7 is available!
| Private help, bug fixes, support, ports, new features
| https://curl.se/support.html<https://curl.se/support.html>


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-02-10