Re: Seek problem with curl_formadd with CURLFORM_STREAM

2024-01-29 Thread Patrick Monnerat via curl-library
On 1/29/24 20:33, Jeff Mears via curl-library wrote: I have code that’s attempting to use CURLFORM_STREAM with curl_formadd, and it is getting a CURLE_SEND_FAIL_REWIND error from the library. As the formadd API is deprecated, this is not considered as a bug anymore and won't be fixed. It

Re: HTTP header validation

2024-01-29 Thread Daniel Stenberg via curl-library
On Mon, 29 Jan 2024, Stephen Booth via curl-library wrote: A sanity check in curl would have helped me find the problem but it sounds like there are reasons I'm not aware of for not attempting any validation. In the early days of supporting custom HTTP headers, I know some users provided

Re: HTTP header validation

2024-01-29 Thread Stephen Booth via curl-library
On 29/01/2024 21:34, Dan Fandrich via curl-library wrote: This is a case of GIGO. The man page even warns against this: curl makes sure that each header you add/replace is sent with the proper end-of-line marker, you should thus not add that as a part of the header content: do

Re: HTTP header validation

2024-01-29 Thread Dan Fandrich via curl-library
On Mon, Jan 29, 2024 at 08:59:03PM +, Stephen Booth via curl-library wrote: > I eventually tracked the problem down to the bearer token being passed > having an extra newline inserted at the end. This was copied through to > the http request (adding a blank line and making the server ignore

HTTP header validation

2024-01-29 Thread Stephen Booth via curl-library
I've just been debugging a very weird bug in some scripted automation The script takes a bearer token as a parameter that is inserted into the http request using the -H curl flag. I eventually tracked the problem down to the bearer token being passed having an extra newline inserted at the end.

Re: Seek problem with curl_formadd with CURLFORM_STREAM

2024-01-29 Thread Dan Fandrich via curl-library
On Mon, Jan 29, 2024 at 07:33:59PM +, Jeff Mears via curl-library wrote: > I have code that’s attempting to use CURLFORM_STREAM with curl_formadd, and it > is getting a CURLE_SEND_FAIL_REWIND error from the library. > > Looking at the libcurl code, it looks like it might be a bug, but it’s

Seek problem with curl_formadd with CURLFORM_STREAM

2024-01-29 Thread Jeff Mears via curl-library
I have code that's attempting to use CURLFORM_STREAM with curl_formadd, and it is getting a CURLE_SEND_FAIL_REWIND error from the library. Looking at the libcurl code, it looks like it might be a bug, but it's hard for me to tell for sure. A full example of how the library is being used would