heph
heph copied to clipboard
Release Heph-HTTP
Incomplete list from while I was working on the code:
- [ ] Add README file.
- [x] #494.
- [x] #495.
- [ ] #496.
- [x] #497.
- [x] #499.
- [ ] Testing:
- [ ]
client
module.- [ ] Testing:
Client::read_chunk
and down.
- [ ] Testing:
- [ ]
server
module.- [ ] HTTP/1.0 requests.
- [ ] Pipeline requests and responses.
- [ ] Are non-read body dropped from the connection:
- [ ] Oneshot (with Content-Length).
- [ ] Chunked.
- [ ] Chunked very-long... at some we want to stop reading...
- [ ] RFC 7230 section 3.3.3 point 5.
- [ ]
Connection::send_response
:- [ ] User setting Content-Length header.
- [ ] User setting Transfer-Encoding header.
- [ ] User setting Date header.
- [ ] Automaitcally setting Connection header for HTTP/1.0.
- [ ] No body and "Content-Length: 0" for:
- [ ] 100..=199 Status Code.
- [ ] 204 Status Code.
- [ ] 304 Status Code.
- [ ] Automaitcally setting Transfer-Encoding header for chunked body.
- [ ]
Body::recv
. - [ ]
Body::recv_vectored
. - [ ]
Body::read_all
. - [ ]
Body
asBody
in another request.
- [ ]
body
module: #503. - [ ]
handler
module.
- [ ]
- [ ] Expand crate documentation, including examples.
- [ ] Review: src/server.rs.
- [ ] Review: src/client.rs.
- [ ] Review: src/body.rs.
Maybe
- [ ] ~~Always set
TCP_NODELAY
onserver::Connection
. Not possible to do inArgMap
.~~ Leaving this up to the user. - [ ] Accept
length: Option<NonZeroUsize>
inFileBody::new
.
IDEAS
- [ ] Create a higher level API, perhaps in a service module.
- [ ] FromRequest trait that allow parsing helpers, e.g. Json, Query, etc.
- [ ] IntoResponse trait that allow deserialisors helpers, e.g. Json.
- [x] Service trait: #491.
- [x] Middleware trait: #492.
- [ ] Router type: #493.
Check RFCs
Go through RFC for correctness, test for each section/requirement in them.
Create tests for each section/paragraph from the RFCS:
- [ ] RFC 7230 - HTTP Message Syntax and Routing
- [ ] RFC 7231 - HTTP Semantics and Content
- [ ] RFC 7232 - HTTP Conditional Requests
- [ ] RFC 7233 - HTTP Range Requests
- [ ] RFC 7234 - HTTP Caching
- [ ] RFC 7235 - HTTP Authentication
- [ ] RFC 7236 - HTTP Authentication Scheme Registrations
- [ ] RFC 7237 - HTTP Method Registrations
- [ ] RFC 7238 - HTTP Status Code 308 (Permanent Redirect)
- [ ] RFC 7239 - Forwarded HTTP Extension
- [ ] RFC 7240 - Prefer Header for HTTP
- [ ] RFC 5789 - PATCH Method for HTTP
Search for more HTTP related RFCs.
Related RFCs:
HTTP relies upon the Uniform Resource Identifier (URI) standard [RFC3986].
Transport Layer Security (TLS, [RFC5246]).
Obsolete RFCs
- RFC 2616
- RFC 2145
Have you considered using the http
crate? It would be of great benefit to the ecosystem for it to see more adoption.
@ibraheemdev I know of the http crate, the problem is that it uses the bytes crate underneath and I don't think that's needed. But I'm considering a feature to support http
and a more higher-level API.