ConnectionManager ignores multiple Set-Cookie headers
Brought to you by:
derrickoswald
Not sure what the specifications are, but the ConnectionManager will only process one Set-Cookie header when there are more available.
Based on versie 2.1, the cause is org.htmlparser.http.ConnectionManager.parseCookies(URLConnection), line 1098:
string = connection.getHeaderField ("Set-Cookie");
This will only handle one header.
I will attach a fixed ConnectionManager.java which can be used as a patch.
Patched ConnectionManager which handles multiple Set-Cookie headers
Just for the record: browsers like Firefox are robust for multiple Set-Cookie headers.