Skip to content

Commit

Permalink
Merge pull request #150 from andreas/graphql-cohttp/fix-routing
Browse files Browse the repository at this point in the history
Fix routing in graphql-cohttp
  • Loading branch information
andreas authored Mar 28, 2019
2 parents cc9d367 + 87b9b24 commit 9ec8c84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphql-cohttp/src/graphql_cohttp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ module Make

let make_callback : (Cohttp.Request.t -> 'ctx) -> 'ctx Schema.schema -> 'conn callback = fun make_context schema _conn (req : Cohttp.Request.t) body ->
let req_path = Cohttp.Request.uri req |> Uri.path in
let path_parts = Astring.String.cuts ~sep:"/" req_path in
let path_parts = Astring.String.cuts ~empty:false ~sep:"/" req_path in
match req.meth, path_parts with
| `GET, ["graphql"] ->
if Cohttp.Header.get req.Cohttp.Request.headers "Connection" = Some "Upgrade" && Cohttp.Header.get req.headers "Upgrade" = Some "websocket" then
Expand Down

0 comments on commit 9ec8c84

Please sign in to comment.