-
Notifications
You must be signed in to change notification settings - Fork 623
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
feat(http): Add --header option to file_server #2977
Conversation
Is there a use case of |
@timreichen good question.
There may be a point to be made that there is no value in having both supported in |
Adding specific option for each header feels problematic to me as there are many HTTP headers. How about adding option for appending any kind of headers by the pairs of keys and values. |
@kt3k 100% agree in theory, but I think this should be an addition feature. I think that caching is a very basic header that should really have been an option. What are you thinking for cli inputs for adding arbitrary http headers? I would imagine something like: |
How about following curl's
parse(Deno.args, { collect: ["header"] }); |
@kt3k that makes a lot of sense. So now to move forward, should we :
I'm game for either, though I personally do see value in |
I prefer the first option. |
Sounds good to me, I will rework this PR when I get the chance (probably this weekend). |
@kt3k PTAL Thanks! |
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.
LGTM. Nice work!
A big thanks to @plohm12 for the initial work in #2589.
This PR adds
--cache
(or-C
) as an option for file_server. It follows a similar spec to http_server over on the node side where--cache=-1
meansno-store
.