* Let ResponseError render w/ 'text/plain; charset=utf-8' header (#1118)
Trait ResponseError originally render Error messages with header
`text/plain` , which causes browsers (i.e. Firefox 70.0) with
Non-English locale unable to render UTF-8 responses with non-English
characters correctly. i.e. emoji.
This fix solved this problem by specifying the charset of `text/plain`
as utf-8, which is the default charset in rust.
Before actix-web consider to support other charsets, this hotfix is
enough.
Test case:
fn test() -> Result<String, actix_web::Error> {
Err(actix_web::error::ErrorForbidden("ðtest"))
}
* Update actix-http/CHANGES.md for #1118
* Expose ContentDisposition in actix-multipart to fix broken doc link
* Revert "Expose ContentDisposition in actix-multipart to fix broken doc link"
This reverts commit e90d71d16c.
* Unhide actix-http::header::common docs
These types are used in other exported documented interfaces and create
broken links if not documented.
See `actix_multipart::Field.content_disposition`
Allows using an existing Unix Listener instead of binding to a path.
Useful for when running as a daemon under systemd.
Change-Id: I54a0e78c321d8b7a9ded381083217af590e9a7fa
* Implement `register_data` method on `Resource` and `Scope`.
* Split Scope::register_data tests out from Scope::data tests.
* CHANGES.md: Mention {Scope,Resource}::register_data.
* Initial commit
* Added extra_headers
* Added freeze() method to ClientRequest which produces a 'read-only' copy of a request suitable for retrying the send operation
* Additional methods for FrozenClientRequest
* Fix
* Increased crates versions
* Fixed a unit test. Added one more unit test.
* Added RequestHeaderWrapper
* Small fixes
* Renamed RequestHeadWrapper->RequestHeadType
* Updated CHANGES.md files
* Small fix
* Small changes
* Removed *_extra methods from Connection trait
* Added FrozenSendBuilder
* Added FrozenSendBuilder
* Minor fix
* Replaced impl Future with concrete Future implementation
* Small renaming
* Renamed Send->SendBody
* Ensure that awc::ws::WebsocketsRequest sets the Host header before connecting.
* Make sure to check if headers already have a HOST value before setting
* Update CHANGES.md to reflect WebSocket client update.