Added some documentation to readme, and url decoding
This commit is contained in:
parent
f20c027e1c
commit
027ad4c1e6
|
@ -1,6 +1,12 @@
|
|||
# http-transport
|
||||
|
||||
Implementations of HTTP transport protocols, compatible with other Handy-Http components.
|
||||
This library provides implementations of various versions of HTTP transport,
|
||||
acting as a "glue" for connecting clients and servers. Practically speaking,
|
||||
the handy-http-transport library provides HTTP server implementations you can
|
||||
use interchangeably with other handy-http libraries.
|
||||
|
||||
For now, see the section on HTTP/1.1, as that's the only HTTP version
|
||||
implemented so far.
|
||||
|
||||
## HTTP/1.1
|
||||
|
||||
|
|
|
@ -159,11 +159,13 @@ HttpRequestParseResult readHttpRequest(S)(S inputStream, in ClientAddress addr)
|
|||
auto headersResult = parseHeaders(inputStream);
|
||||
if (headersResult.hasError) return HttpRequestParseResult(headersResult.error);
|
||||
|
||||
import std.uri : decode; // TODO: Remove dependency on phobos for this?
|
||||
|
||||
return HttpRequestParseResult(ServerHttpRequest(
|
||||
httpVersion,
|
||||
addr,
|
||||
methodStr.value,
|
||||
urlStr.value,
|
||||
decode(urlStr.value),
|
||||
headersResult.headers,
|
||||
inputStreamObjectFor(inputStream)
|
||||
));
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
module handy_http_transport.http2;
|
||||
|
||||
// Not yet implemented.
|
||||
|
|
Loading…
Reference in New Issue