trillium-http-v1.0.1
·
191 commits
to main
since this release
Changed
- Compatible with trillium 1.0
StateSetrenamed toTypeSetand extracted to thetype-setcrate; re-exported astrillium_http::TypeSet- Trillium 1.0 uses Swansong instead of Stopper;
Conn::stopper()→Conn::swansong() Errorvariants renamed for consistency:MalformedHeader→InvalidHeaderValue,PartialHead→InvalidHead,MissingVersion→InvalidVersion,UnrecognizedStatusCode/MissingStatusCode→InvalidStatus/MissingStatus;HeaderMissingandUnexpectedHeadernow carryHeaderName<'static>instead of&'static str;UnsupportedVersionnow carriesVersioninstead ofu8Version::Http2_0renamed toVersion::Http2;Version::Http3_0renamed toVersion::Http3Upgradeis now#[non_exhaustive];Upgrade::bufferchanged fromOption<Vec<u8>>toBuffer;Upgrade::stopperrenamed toUpgrade::swansong;Upgrade::peer_ip: Option<IpAddr>addedReceivedBodyno longer implementsStream; useAsyncReadinsteadHeaders::contains_ignore_ascii_caseremoved (was deprecated)Headers::appendandHeaders::try_insert_withnow return&mut HeaderValuesinstead of()set_*setters onConn(e.g.set_status,set_host) now return&mut Self, enabling chaining- Handler futures in
Conn::mapand friends no longer requireSend pub mod transportremoved — theTransporttrait is now attrillium::TransportBody::new_streamingno longer requires aSyncreader.Conn::request_bodyis synchronous now. 100-continue is sent, if necessary, on first read from the body.ReceivedBodyno longer implementsIntoFutureto make the transition to request_body being synchronous easier.
Added
Headers::entry()— Entry API for inserting/modifying headers, mirroringHashMap::entryparsefeature — opt-in alternative header parser (bypasses httparse; groundwork for H3)HttpContextis now public — Arc-shared per-server state (Swansong + TypeSet + HttpConfig) passed to every connectionpub mod h3— HTTP/3 protocol primitives: QPACK encode/decode, H3 framing,H3Connection,H3Body,H3Error; used bytrillium-quinnand other QUIC adapter crates