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

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -