Alex Butler
dea67d6cca
Fix doc typo
2 years ago
Alex Butler
41818166cf
refactor WebSocketContext new
2 years ago
Alex Butler
0cada00fb5
Refactor write_one_frame -> buffer_frame
2 years ago
Alex Butler
f33bb2cb97
Ensure out_buffer written when !can_read
2 years ago
Alex Butler
1b47964f18
split write and write_out_buffer internals
...
Fix internal method naming
2 years ago
Alex Butler
2ef5b9a5e2
Buffer writes before writing to the underlying stream
...
Add write_buffer_size
Set default 128 KiB
2 years ago
Alex Butler
06e55a4ef2
Refactor additional_send writing
2 years ago
Alex Butler
84a54b76e6
Rename methods to `read`, `send`, `write` & `flush`
...
Refine docs
Add `send` method
Add deprecated versions of write_message, write_pending,
read_message
Handle pong WriteBufferFull error
Add changelog
2 years ago
Alex Butler
0203a1849b
Remove send_queue, use out_buffer instead
2 years ago
Alex Butler
483d229707
Remove implicit write flushing
2 years ago
Benoît CORTIER
ee3ffc9e9d
Gracefully handle invalid native root certificates
...
Before this patch, the `rustls::RootCertStore::add` method was used
to add all the root certificates found by `rustls_native_certs` crate.
This is a problem when an ancient or invalid certificate is present
in the native root store. `rustls` documentation says the following:
> This is suitable for a small set of root certificates that
> are expected to parse successfully. For large collections of
> roots (for example from a system store) it is expected that
> some of them might not be valid according to the rules `rustls`
> implements. As long as a relatively limited number of certificates
> are affected, this should not be a cause for concern. Use
> `RootCertStore::add_parsable_certificates` in order to add as many
> valid roots as possible and to understand how many certificates have
> been diagnosed as malformed.
With this patch, `RootCertStore::add_parsable_certificates` is used
instead for maximal compability with system store.
> Parse the given DER-encoded certificates and add all that can be
> parsed in a best-effort fashion.
>
> This is because large collections of root certificates often include
> ancient or syntactically invalid certificates.
2 years ago
Constantin Nickel
8a436e7550
Remove unused `TlsError::Webpki` error variant
...
The error variant is no longer needed since `rustls` 0.21.
2 years ago
Daniel Abramov
a4863d3f10
Make code compile with any feature set
2 years ago
Daniel Abramov
87e9f576af
Make `cargo fmt` happy
2 years ago
Martin Lemesle
1f6c62d301
Fix not compiling features rustls-tls-native-roots and rustls-tls-webpki-roots
2 years ago
Daniel Abramov
42b8797e8b
Revert "Add `permessage-deflate` support"
...
This reverts commit edb2377540
.
See https://github.com/snapview/tungstenite-rs/pull/328#issuecomment-1480349206
2 years ago
kazk
edb2377540
Add `permessage-deflate` support
2 years ago
EXPLOSION
5125c59dfa
Display correct payload in Frame::fmt
2 years ago
Jack Wills
657faf427f
docs: message.rs typo
...
Simple typo fix of is_close() method
2 years ago
Sebastian Dröge
c6769e3dae
Switch from base64 0.20 to data-encoding 2
...
base64 0.21 deprecated the simple API and requires quite a bit more code
for the simple usage here, while data-encoding provides exactly the API
needed and is also actively maintained.
2 years ago
ssrlive
3fc7fb412c
Mark some functions as public ( #315 )
...
Fixes #315 .
Co-authored-by: Daniel Abramov <inetcrack2@gmail.com>
2 years ago
Yang Hau
984ad9d6c7
fix typos
2 years ago
Josiah Bull
1c657d4c6a
feat: switched response type from Vec<u8> to Option<Vec<u8>> to allow returning of differentiation of no body from empty body.
2 years ago
Josiah Bull
36ab770059
feat: error type returns `Vec<u8>` instead of `Option<String>`
2 years ago
Josiah Bull
4a7beaa897
feat: error responses return body upon non 101 status code
...
modified `client::Response` type to contain `String` instead of `()` to achieve this.
2 years ago
Icelk
4023390d38
Make handshake dependencies optional.
2 years ago
Daniel Abramov
fd96a35300
tests: add a regression test for the queue logic
2 years ago
Alexey Galakhov
0b9d2a649b
Revert "add support for batching websocket messages"
2 years ago
RustUser246
68daa29b19
add support for batching websocket messages
2 years ago
n3oney
80d0547fab
fix: uppercase origin header
3 years ago
Daniel Abramov
b8ccbcf2a1
chore: update the documentation
...
Fixes #280 .
3 years ago
kangalioo
fa70a370c8
Downgrade MSRV to 1.51
3 years ago
Daniel Abramov
2171c997f5
test: add a unit test for invalid `http::Request`
...
This is to make sure that we don't panic anymore in such cases:
https://github.com/snapview/tungstenite-rs/pull/267
3 years ago
Sebastian Dröge
1a48959adc
`HeaderName::from_static` requires all-lowercase HTTP2 compatible header names
...
and was passed header names with uppercase characters instead, which
made it panic.
3 years ago
Teo Klestrup Röijezon
d21c7b53ca
Downgrade MSRV to 1.56
3 years ago
Daniel Abramov
d661f57224
client: overhaul of the request generation
3 years ago
Daniel Abramov
1b999136ef
clippy: fix warnings
3 years ago
Kirill A. Khalitov
469aaf37be
feature: Raw fragment message
3 years ago
Florian Uekermann
3e45100f5d
replace unwrap with ?
3 years ago
Daniel Abramov
6c4d2bab04
Fix newly introduced clippy warnings
3 years ago
Daniel Abramov
5ad8cef6ff
Echo the `CloseFrame` when close is initiated
3 years ago
Dominik Nakamura
f4bb653aa0
Upgrade to rustls 0.20
3 years ago
PhotonQuantum
3f5d0985f0
Move ReadBuffer chunk to heap
3 years ago
yifei
9f563561a4
fix: return err if try to overwrite standard hedaer
3 years ago
Dominik Nakamura
32450ae5af
Add a connector to configure TLS config
4 years ago
Dominik Nakamura
5e0fde5dc6
Fix clippy warnings and deprecated settings
4 years ago
Dominik Nakamura
8b029baa8d
Fix wrong feature name when setting certs
4 years ago
Dominik Nakamura
3efb0544c6
Remove the rustls-tls feature flag
4 years ago
Dominik Nakamura
3fbd583f29
Enable root cert providers through feature flags
4 years ago
Daniel Abramov
83722c24aa
Clean up the read portion of the buffer
4 years ago