Added option for custom headers
This PR adds an option to provide custom headers.
Relevant issues
Resolves #884
Contributor checklist
- [ ] Provide tests for the changes (unless documentation-only)
- [X] Documented any new features, CLI switches, etc. (if applicable)
- [X] Server
--helpoutput - [X] README.md
- [X] doc/http-server.1 (use the same format as other entries)
- [X] Server
- [X] The pull request is being made against the
masterbranch
Maintainer checklist
- [ ] Assign a version triage tag
- [ ] Approve tests if applicable
I was coming back to make tests for this PR and fix the fact it doesn't handle colons in the header values, but I saw there was an other PR https://github.com/http-party/http-server/pull/887 which uses the curl approach to adding headers. Which approach would be prefered? should I just close this one if we'd rather use the curl-based one?
I was coming back to make tests for this PR and fix the fact it doesn't handle colons in the header values, but I saw there was an other PR #887 which uses the curl approach to adding headers. Which approach would be prefered? should I just close this one if we'd rather use the curl-based one?
Thanks for bringing the dupe to my attention. I like the idea of using known conventions where possible. Let's move focus to #887, and I've also opened discussion #899 so we can talk about superset syntax (i.e. maybe we allow semicolon-separated values as well if it doesn't conflict with curl's convention, because that seems more convenient to me).