Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the URL contains more than 65534 characters, the error code returned by Hyper is not 414. #2701

Closed
silence-coding opened this issue Nov 19, 2021 · 2 comments · Fixed by #2706
Labels
A-http1 Area: HTTP/1 specific. A-server Area: server. C-bug Category: bug. Something is wrong. This is bad! E-easy Effort: easy. A task that would be a great starting point for a new contributor.

Comments

@silence-coding
Copy link
Contributor

The length of the from_shared method of the third-party library http::Uri is verified, The maximum length is (u16::MAX - 1).

@silence-coding silence-coding added the C-bug Category: bug. Something is wrong. This is bad! label Nov 19, 2021
@seanmonstar
Copy link
Member

Good catch! We could add a check for the length just before calling Uri::from_shared, and if too long, return a Parse error. An integration test in tests/server.rs would be good too.

@seanmonstar seanmonstar added A-http1 Area: HTTP/1 specific. A-server Area: server. E-easy Effort: easy. A task that would be a great starting point for a new contributor. labels Nov 19, 2021
rajing added a commit to rajing/hyper that referenced this issue Nov 22, 2021
Previous behavior returned a 404 Bad Request. Conforms to HTTP 1.1 RFC.

Closes hyperium#2701
@rajing
Copy link
Contributor

rajing commented Nov 22, 2021

First pull request. Happy to change based on feedback.

rajing added a commit to rajing/hyper that referenced this issue Nov 23, 2021
Previous behavior returned a 404 Bad Request. Conforms to HTTP 1.1 RFC.

Closes hyperium#2701
rajing added a commit to rajing/hyper that referenced this issue Nov 25, 2021
Previous behavior returned a 404 Bad Request. Conforms to HTTP 1.1 RFC.

Closes hyperium#2701
rajing added a commit to rajing/hyper that referenced this issue Nov 25, 2021
Previous behavior returned a 404 Bad Request. Conforms to HTTP 1.1 RFC.

Closes hyperium#2701
rajing added a commit to rajing/hyper that referenced this issue Nov 25, 2021
Previous behavior returned a 404 Bad Request. Conforms to HTTP 1.1 RFC.

Closes hyperium#2701
rajing added a commit to rajing/hyper that referenced this issue Nov 25, 2021
Previous behavior returned a 404 Bad Request. Conforms to HTTP 1.1 RFC.

Closes hyperium#2701
rajing added a commit to rajing/hyper that referenced this issue Nov 25, 2021
Previous behavior returned a 404 Bad Request. Conforms to HTTP 1.1 RFC.

Closes hyperium#2701
seanmonstar pushed a commit that referenced this issue Nov 29, 2021
…2706)

Previous behavior returned a 404 Bad Request. Conforms to HTTP 1.1 RFC.

Closes #2701
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-http1 Area: HTTP/1 specific. A-server Area: server. C-bug Category: bug. Something is wrong. This is bad! E-easy Effort: easy. A task that would be a great starting point for a new contributor.
Projects
None yet
3 participants