-
-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom Header not sent #1441
Comments
Maybe that has something to do with our recent move to https://docs.rs/lychee-lib/latest/lychee_lib/chain/type.RequestChain.html. @thomas-zahner fyi |
Could not see the headers in netcat even with lychee versions as old as v0.9.0. Does the |
It does; at least on macOS. nc -lv 1234 curl -v -X GET http://localhost:1234 -H "Custom-Header: CustomValue" Results in the following GET / HTTP/1.1
Host: localhost:1234
User-Agent: curl/8.4.0
Accept: */*
Custom-Header: CustomValue Might be a problem with lychee. |
It seems to affect the initial request, the header is only set for subsequent ones. |
Strange. I'm not aware of any special handling for the first request. Will need to investigate. |
So I think that the If you do Maybe we should also include the headers when fetching a websites content (first case) but maybe we should add a separate option for that. I'm not quite sure.. What are your thoughts @mre? |
As a user, I'd expect it to always send the specified headers on every request, including the initial one. (especially since they are used for authentication in my case) It'd be nice to have some customizable rules in the config file to include/exclude certain headers for certain hosts, see #1298, but that is a separate issue. |
Yes, I agree with @mschfh on both points. |
Lychee ignores the
--header
argument:Steps to reproduce:
start local http server:
Run lychee (tested with v0.15.1) with
--header
:Lychee should send
foo: bar
, but doesn't:The text was updated successfully, but these errors were encountered: