Rouille, Rust web server middleware v0.4.0 Release Notes
-
- โ Added support for websockets with the
websocket
module. - Added
Request::do_not_track()
to query the DNT header. - Renamed
get_json_input()
tojson_input()
. - ๐ Renamed
get_cookies()
tocookies()
. - Renamed
get_basic_http_auth()
tobasic_http_auth()
. - ๐ The logs now show the time of the start of the request processing.
Request::header()
now returns aOption<&str>
instead ofOption<String>
.Response::svg()
andResponse::html()
now take aInto<String>
instead of aInto<Vec<u8>>
.- Renamed
Response::error()
andsuccess()
tois_error()
andis_success()
. - The
headers
field ofResponse
are nowVec<(Cow<'static, str>, Cow<'static, str>)>
instead ofVec<(String, String)>
. - Removed
Response::redirect
and replaced it withredirect_301
,redirect_302
, etc. - โ Added
Response::with_etag()
to add an ETag header to a response. - โ Added an
upgrade
field toResponse
, necessary for websockets. - ๐ Fixed being able to set the value of the Content-Length and Transfer-Encoding headers.
plain_text_body
now has a limit of 1 MB of data before returning an error.- Added
plain_text_body_with_limit
which does the same asplain_text_body
but with a customizable limit. - Implemented the
std::error::Error
trait on all error types. - Added
Response::into_reader_and_size()
to retreive aRead
object from aResponseBody
. - ๐ Fixed issue with static files not being found on Windows because of
/
and\
mismatch.
- โ Added support for websockets with the