java - Jsoup issue: cookie gets trimmed unexpectedly -
i want login on site. i'm connecting site using jsoup , getting response this:
connection.response r1 = jsoup.connect("http://example.com/user/login") .header("header1", "val1") .data("password", "123") .referrer("http://example.com/") .method(connection.method.post) .execute();
and getting cookie response:
map<string, string> cookie= r1.cookies();
then pass cookie next request:
doc1 = jsoup.connect("http://example.com/") .cookies(cookie) .method(connection.method.get) .execute();
but can't login because cookie trimmed. checked sniffer requests , respons. i'm getting cookie, pass trimmed. getting mistake?
cookie in hex encoding. has 1 value - session, stores other values in 1 encoded string. decoded , realize, 1 of values empty(""). values come after him cuted. can whith that?
Comments
Post a Comment