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
yifei
9f563561a4
fix: return err if try to overwrite standard hedaer
4 years ago
Maarten de Vries
96612748d1
Expose `handshake::derive_accept_key` as public API.
4 years ago
WiredSound
3e485ddb96
Rename UrlErrorType to just UrlError, implement using thiserror
4 years ago
WiredSound
98377cf3dd
Rename ProtocolErrorType to just ProtocolError, implement using thiserror
4 years ago
WiredSound
aaebb432f0
Fix clippy warnings
4 years ago
WiredSound
6f846da0e3
Add protocol error types
4 years ago
WiredSound
34c6e63d87
Add specific URL error types
4 years ago
Daniel Abramov
96d9eb75e5
chore: apply `fmt` to the whole project
4 years ago
Daniel Abramov
a8e06d2b39
clean up http error handling
4 years ago
Redrield
60f7b0f024
Fix some code-review issues
...
* Replace Redirection error with a general Http error that owns the
response
* Make the default client connect function iterative instead of
recursive
* Add a limit to the amount of redirects a client will attempt to
perform
4 years ago
Redrield
6bce14fa26
Add facilities to allow clients to follow HTTP 3xx redirects
...
* The connect() function defined in this crate will automatically follow
redirecting responses.
* Adds Error::Redirection, which is a special case of Error::Http that
extracts the redirection target from the response headers, and stores it
in the error object. Client implementations that build upon tungstenite
can use this to implement redirecting.
* A catch-all solution for redirects is not possible due to the
abstraction transforming socket types to Read + Write, implementations
that use the client_* methods need to handle redirections themselves.
4 years ago
kids300
fb83e8c791
rm to_string
5 years ago
Yan
16a33df195
fix ws subportocol lowercase header
5 years ago
Alexey Galakhov
c08f2c72ff
client: correct port in request
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
5 years ago
Alexey Galakhov
9ec11cbc7a
client: cover request generation with tests
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
5 years ago
Sebastian Dröge
88760b8b59
Fix various clippy warnings
5 years ago
Sebastian Dröge
07d4721ffd
Add type aliases for Response/Request with a fixed body type
...
Simplifies correct usage of the API.
5 years ago
Sebastian Dröge
9020840f84
Remove custom Request/Response types from client code
...
Fixes https://github.com/snapview/tungstenite-rs/issues/92
5 years ago
Sebastian Dröge
38a7d1a375
Remove custom Headers type and use http::HeaderMap instead
...
Fixes https://github.com/snapview/tungstenite-rs/issues/92
5 years ago
Daniel Abramov
c291395d3b
Fixes #86
6 years ago
Danny Browning
02684b4946
Try removing unpin
6 years ago
Danny Browning
614a5068fa
Tokio-Tungstenite Async Changes
...
Changes required for tokio-tungstenite async implementation.
6 years ago
Artem Vorotnikov
cbf80ecc76
Edition 2018, formatting, clippy fixes
6 years ago
Alexey Galakhov
e6ebf5ac76
trivial: style fixes
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Daniel Abramov
00303fa60c
Make the websocket configurable
7 years ago
Sean Schwartz
66d2c15f2d
Derive Debugs
...
Deny missing debug and resolve resulting errors to satisfy:
https://rust-lang-nursery.github.io/api-guidelines/debuggability.html#all-public-types-implement-debug-c-debug
Requires updated input_buffer pushed to crates.io:
- Resolved build errors by using github version of code until new version available on crates.io
Upgrade env_logger dev-dependency to v0.5.3
- Removed unwrap call from env_logger::init() as it is no longer needed.
7 years ago
Daniel Abramov
c4013ccad3
Improve the `handshake::client::Request` structure
8 years ago
Daniel Abramov
44a15c9eab
Implements #6 (client/server headers access)
8 years ago
Daniel Abramov
f34c488217
Add basic support for examining headers ( #6 )
8 years ago
Alexey Galakhov
bd9ac9673e
chore: cleanup docs and warnings, strict docs
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
f696771069
Generalize connect() interface.
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
24f3bb7807
Add the possibility to pass extra request headers.
...
Closes : #5
Suggestions for a more convenient API are welcome.
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
53aa24b06b
Fix warnings
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
9e00140e19
trivial: debug logging cleanup
8 years ago
Alexey Galakhov
c6d3dd6404
refactor: fix unit tests for new API
8 years ago
Alexey Galakhov
b7557f1baa
refactor: make handshake completely async
8 years ago
Daniel Abramov
93843a1290
Fix `WouldBlock` error handling for the handshakes
8 years ago
Alexey Galakhov
422f7bbc45
trivial: move MIN_READ to input_buffer
8 years ago
Alexey Galakhov
e63f594a14
Initial commit, mostly working client
8 years ago