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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -