-
-
Notifications
You must be signed in to change notification settings - Fork 192
Add support for custom headers in input processing #1561
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
Conversation
cd2833b to
4b08e3e
Compare
thomas-zahner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mre I think this PR still needs some polishing to do. Also there are merge conflicts by now
lychee -u "Agent1" http://127.0.0.1:8082 |
The new header separator is `:`, similar to what curl uses.
… conversion from Vec of header pairs
81f123a to
e8495b5
Compare
5ec0ba4 to
06f89bb
Compare
9fa094f to
281be4d
Compare
|
@thomas-zahner, this is ready for another review. 😊 |
thomas-zahner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good 👌
Previously, we didn't pass (auth) headers to the initial set of inputs -- only to the links which were discovered in the initial input set. That's inconsistent and led to some confusion.
This PR fixes that. There is probably a nicer design for input parsing; the constructor has quite a few "dummy" params now, which tend to be set to the same values. I guess we can refactor that to, say, introduce the notion of an
InputBuilderif it becomes to tedious to set these values. I guess we should decouple input parsing for the different input types in general because header handling is only needed for web requests and not for file inputs.For now, I just introduced a helper method
Input::from_value.This fixes #1441.