Skip to content
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

Make the checking of host value as configurable #24

Closed
noviceamateur opened this issue Feb 3, 2020 · 1 comment
Closed

Make the checking of host value as configurable #24

noviceamateur opened this issue Feb 3, 2020 · 1 comment
Labels

Comments

@noviceamateur
Copy link

noviceamateur commented Feb 3, 2020

I am trying to convert a string to a http request using this library which has no host.
String - >

GET /storage/ua/example.psd/:applicationMetadata
content-type: application/json

The current code mandates the presence of host value which I dont have nor do I want.
Could this be made optional using some configuration ?

@renatoathaydes
Copy link
Owner

The host is mandatory according to the RFC.
There's an option to automatically set the Host header when you parse a request if the header is missing, but in that case the host must appear in the start-line, e.g. GET https://myhost.com/storage otherwise there's no way at all to know where to send the request to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants