Skip to content

Conversation

@mre
Copy link
Member

@mre mre commented Nov 7, 2024

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 InputBuilder if 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.

@mre mre requested a review from thomas-zahner November 7, 2024 21:41
@mre mre force-pushed the 1441-always-send-headers branch from cd2833b to 4b08e3e Compare February 7, 2025 17:11
Copy link
Member

@thomas-zahner thomas-zahner left a 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

@mre
Copy link
Member Author

mre commented May 8, 2025

⚠️ We might also want to tackle send custom user-agents at the same time: #1690:

lychee  -u "Agent1"  http://127.0.0.1:8082

@mre mre force-pushed the 1441-always-send-headers branch 2 times, most recently from 81f123a to e8495b5 Compare May 17, 2025 00:06
@mre mre requested a review from thomas-zahner May 17, 2025 00:08
@mre mre force-pushed the 1441-always-send-headers branch from 5ec0ba4 to 06f89bb Compare May 17, 2025 18:33
@mre mre force-pushed the 1441-always-send-headers branch from 9fa094f to 281be4d Compare May 17, 2025 19:05
@mre
Copy link
Member Author

mre commented May 18, 2025

@thomas-zahner, this is ready for another review. 😊

Copy link
Member

@thomas-zahner thomas-zahner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good 👌

@mre mre merged commit 3561076 into master May 23, 2025
6 checks passed
@mre mre deleted the 1441-always-send-headers branch May 23, 2025 11:37
@mre mre added the nlnet-mre label May 23, 2025
This was referenced May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

custom Header not sent

2 participants