diff --git a/README.md b/README.md index a13a45d..f2e1f43 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ main(_) -> ok = application:start(sockjs), ok = application:start(ranch), ok = application:start(crypto), + ok = application:start(cowlib), ok = application:start(cowboy), SockjsState = sockjs_handler:init_state( diff --git a/examples/cowboy_echo.erl b/examples/cowboy_echo.erl index ac18843..fd6ea45 100755 --- a/examples/cowboy_echo.erl +++ b/examples/cowboy_echo.erl @@ -15,6 +15,7 @@ main(_) -> ok = application:start(sockjs), ok = application:start(ranch), ok = application:start(crypto), + ok = application:start(cowlib), ok = application:start(cowboy), SockjsState = sockjs_handler:init_state( diff --git a/examples/cowboy_test_server.erl b/examples/cowboy_test_server.erl index c7396e5..3ecda4a 100755 --- a/examples/cowboy_test_server.erl +++ b/examples/cowboy_test_server.erl @@ -14,7 +14,8 @@ main(_) -> ok = application:start(xmerl), ok = application:start(sockjs), ok = application:start(ranch), - ok = application:start(crypto), + ok = application:start(crypto), + ok = application:start(cowlib), ok = application:start(cowboy), StateEcho = sockjs_handler:init_state( diff --git a/rebar.config b/rebar.config index 03f63bb..bca9d70 100644 --- a/rebar.config +++ b/rebar.config @@ -11,5 +11,5 @@ ]}. {deps, [ - {cowboy, "0.8.3",{git, "https://github.com/extend/cowboy.git", "0.8.3"}} + {cowboy, "0.10.0",{git, "https://github.com/extend/cowboy.git", "0.10.0"}} ]}. diff --git a/src/sockjs_http.erl b/src/sockjs_http.erl index 5060beb..59074e0 100644 --- a/src/sockjs_http.erl +++ b/src/sockjs_http.erl @@ -70,7 +70,7 @@ header(K, {cowboy, Req})-> -spec jsessionid(req()) -> {nonempty_string() | undefined, req()}. jsessionid({cowboy, Req}) -> - {C, Req2} = cowboy_req:cookie(<<"jsessionid">>, Req), + {C, Req2} = cowboy_req:cookie(<<"JSESSIONID">>, Req), case C of _ when is_binary(C) -> {binary_to_list(C), {cowboy, Req2}};