-
Notifications
You must be signed in to change notification settings - Fork 1k
fix(server/http): graphql server compliance issues #4507
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
Conversation
40b9611
to
d4544f9
Compare
server/http/src/service.rs
Outdated
@@ -229,15 +235,80 @@ where | |||
/// Handles 404s. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment needs to be updated.
This would break any consumer which sends requests with a content-type or content-length. While that's reasonable and spec-compliant, I wouldn't want to roll this out without some switch to turn this off, in case any users report issues, so they have time to update their apps. |
4903e66
to
ed01c1b
Compare
Hey @leoyvens, thanks for the feedback! Using the |
server/http/src/test_utils.rs
Outdated
@@ -7,14 +7,15 @@ use hyper::{header::ACCESS_CONTROL_ALLOW_ORIGIN, Body, Response}; | |||
pub fn assert_successful_response( | |||
response: Response<Body>, | |||
) -> serde_json::Map<String, serde_json::Value> { | |||
assert_eq!(response.status(), StatusCode::OK); | |||
// assert_eq!(response.status(), StatusCode::OK); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this commented out code be removed?
server/http/src/test_utils.rs
Outdated
@@ -51,6 +52,7 @@ pub fn assert_error_response( | |||
let json: serde_json::Value = | |||
serde_json::from_str(&body).expect("GraphQL response is not valid JSON"); | |||
|
|||
println!("{:?}", json); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the two println!
in this file be removed?
Just two tiny comments before we can merge. |
I've cleaned up the log and uncommented check |
closes #4037