Skip to content

Commit c1f9e5f

Browse files
authored
Merge branch 'master' into add_tracing_support
2 parents 419520d + c80cecf commit c1f9e5f

File tree

4 files changed

+3
-41
lines changed

4 files changed

+3
-41
lines changed

juniper_rocket_async/Makefile.toml

Lines changed: 0 additions & 17 deletions
This file was deleted.

juniper_rocket_async/examples/rocket_server.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(decl_macro, proc_macro_hygiene)]
2-
31
use juniper::{
42
tests::fixtures::starwars::{model::Database, schema::Query},
53
EmptyMutation, EmptySubscription, RootNode,

juniper_rocket_async/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ Check the LICENSE file for details.
3737
*/
3838

3939
#![doc(html_root_url = "https://docs.rs/juniper_rocket_async/0.2.0")]
40-
#![feature(decl_macro, proc_macro_hygiene)]
4140

4241
use std::io::Cursor;
4342

@@ -152,8 +151,6 @@ impl GraphQLResponse {
152151
/// # Examples
153152
///
154153
/// ```
155-
/// # #![feature(decl_macro, proc_macro_hygiene)]
156-
/// #
157154
/// # extern crate juniper;
158155
/// # extern crate juniper_rocket_async;
159156
/// # extern crate rocket;

juniper_warp/src/lib.rs

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ use juniper::{
4949
};
5050
use std::{collections::HashMap, str, sync::Arc};
5151
use tokio::task;
52-
use warp::{body, filters::BoxedFilter, header, http, query, Filter};
52+
use warp::{body, filters::BoxedFilter, http, query, Filter};
5353

5454
/// Make a filter for graphql queries/mutations.
5555
///
@@ -142,10 +142,6 @@ where
142142
}
143143
};
144144
let post_json_filter = warp::post()
145-
.and(header::exact_ignore_case(
146-
"content-type",
147-
"application/json",
148-
))
149145
.and(context_extractor.clone())
150146
.and(body::json())
151147
.and_then(handle_post_json_request);
@@ -164,10 +160,6 @@ where
164160
.then(|res| async { Ok::<_, warp::Rejection>(build_response(res)) })
165161
};
166162
let post_graphql_filter = warp::post()
167-
.and(header::exact_ignore_case(
168-
"content-type",
169-
"application/graphql",
170-
))
171163
.and(context_extractor.clone())
172164
.and(body::bytes())
173165
.and_then(handle_post_graphql_request);
@@ -233,10 +225,6 @@ where
233225
.map_err(|e: task::JoinError| warp::reject::custom(JoinError(e)))
234226
};
235227
let post_json_filter = warp::post()
236-
.and(header::exact_ignore_case(
237-
"content-type",
238-
"application/json",
239-
))
240228
.and(context_extractor.clone())
241229
.and(body::json())
242230
.and_then(handle_post_json_request);
@@ -259,10 +247,6 @@ where
259247
.map_err(|e: task::JoinError| warp::reject::custom(JoinError(e)))
260248
};
261249
let post_graphql_filter = warp::post()
262-
.and(header::exact_ignore_case(
263-
"content-type",
264-
"application/graphql",
265-
))
266250
.and(context_extractor.clone())
267251
.and(body::bytes())
268252
.and_then(handle_post_graphql_request);
@@ -913,7 +897,7 @@ mod tests_http_harness {
913897
self.make_request(
914898
warp::test::request()
915899
.method("POST")
916-
.header("content-type", "application/json")
900+
.header("content-type", "application/json; charset=utf-8")
917901
.path(url)
918902
.body(body),
919903
)
@@ -923,7 +907,7 @@ mod tests_http_harness {
923907
self.make_request(
924908
warp::test::request()
925909
.method("POST")
926-
.header("content-type", "application/graphql")
910+
.header("content-type", "application/graphql; charset=utf-8")
927911
.path(url)
928912
.body(body),
929913
)

0 commit comments

Comments
 (0)