Skip to content

Commit 0d6b8d8

Browse files
committed
curl cookiejar contents incorrect
1 parent ea00cd3 commit 0d6b8d8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/katipo_SUITE.erl

+5-5
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,11 @@ cookies(_) ->
348348
{ok, #{status := 200, cookiejar := CookieJar, body := Body}} = katipo:get(?POOL, Url, Opts),
349349
Json = jsx:decode(Body),
350350
[{<<"cname">>, <<"cvalue">>}] = proplists:get_value(<<"cookies">>, Json),
351-
[<<"httpbin.org\tFALSE\t/\tFALSE\t0\tcname\tcvalue">>] = CookieJar.
351+
[<<"httpbin.org\tFALSE\t/\tTRUE\t0\tcname\tcvalue">>] = CookieJar.
352352

353353
cookies_delete(_) ->
354354
Url = <<"https://httpbin.org/cookies/delete?cname">>,
355-
CookieJar = [<<"httpbin.org\tFALSE\t/\tFALSE\t0\tcname\tcvalue">>],
355+
CookieJar = [<<"httpbin.org\tFALSE\t/\tTRUE\t0\tcname\tcvalue">>],
356356
{ok, #{status := 200, cookiejar := [_], body := Body}} =
357357
katipo:get(?POOL, Url, #{cookiejar => CookieJar, followlocation => true}),
358358
Json = jsx:decode(Body),
@@ -651,16 +651,16 @@ session_new(_) ->
651651
{state, ?POOL, #{cookiejar := CookieJar}} = Session2,
652652
Json = jsx:decode(Body),
653653
[{<<"cname">>, <<"cvalue">>}] = proplists:get_value(<<"cookies">>, Json),
654-
[<<"httpbin.org\tFALSE\t/\tFALSE\t0\tcname\tcvalue">>] = CookieJar.
654+
[<<"httpbin.org\tFALSE\t/\tTRUE\t0\tcname\tcvalue">>] = CookieJar.
655655

656656
session_new_bad_opts(_) ->
657657
{error, #{code := bad_opts}} =
658658
katipo_session:new(?POOL, #{timeout_ms => <<"wrong">>, what => not_even_close}).
659659

660660
session_new_cookies(_) ->
661661
Url = <<"https://httpbin.org/cookies/delete?cname">>,
662-
CookieJar = [<<"httpbin.org\tFALSE\t/\tFALSE\t0\tcname\tcvalue">>,
663-
<<"httpbin.org\tFALSE\t/\tFALSE\t0\tcname2\tcvalue2">>],
662+
CookieJar = [<<"httpbin.org\tFALSE\t/\tTRUE\t0\tcname\tcvalue">>,
663+
<<"httpbin.org\tFALSE\t/\tTRUE\t0\tcname2\tcvalue2">>],
664664
Req = #{url => Url, cookiejar => CookieJar, followlocation => true},
665665
{ok, Session} = katipo_session:new(?POOL, Req),
666666
{{ok, #{status := 200, body := Body}}, Session2} =

0 commit comments

Comments
 (0)