You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're providing the header x-foo: to libcurl. User headers like this are filtered by libcurl, they're not sent as empty headers.
This syntax is also used by libcurl to remove the HTTP request headers that are automatically added (like Host, Accept etc...).
We can change the current code so that a header name: will add an empty header (they're filtered by libcurl today). Maybe having a specific option to remove headers added by libcurl (we re just speaking about Accept and Host here) isn't worth it, given that you can override them or set it with an empty value if we change the code.
With this Hurl file:
We're providing the header
x-foo:
to libcurl. User headers like this are filtered by libcurl, they're not sent as empty headers.This syntax is also used by libcurl to remove the HTTP request headers that are automatically added (like
Host
,Accept
etc...).Example: this file
will remove the Host header used by curl.
We may need to provide a way to send a user empty request header. From https://curl.se/libcurl/c/CURLOPT_HTTPHEADER.html, this is achieved by adding a header with a semi colon:
x-foo;
.We could support a special syntax to indicate that we want to send an empty header
or
Or, for this case, we use the incoming
--header
option:In this case, we need to make some change in the
client.rs
code responsible for configuring libcurl headers.The text was updated successfully, but these errors were encountered: