Closed savageautomate closed 5 years ago
Url in the request start line must be an absolute URL, because I use it to determine protocol (http or https).
Ok, so the library can't be used as part of a HTTP server implementation then, only a HTTP client.
The library works only with an absolute URL, because RFC doesn't describe how https request should look like. If you want to use it on the server side, configure your request module (or what you use) to generate http-message with absolute URL.
I am attempting to use this library to parse a received HTTP request on a server socket. In this use case the hostname is not included in the raw request string and only a relative URL path is included.
Example:
GET /features?p1=v1 HTTP/1.1
The following example code will generate a parsing error:
Error: