Skip to content

Commit eff72ac

Browse files
committed
try our new cookie parser
1 parent d19b9ea commit eff72ac

File tree

4 files changed

+1173
-2
lines changed

4 files changed

+1173
-2
lines changed

src/main/java/org/htmlunit/WebClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
import org.apache.commons.logging.LogFactory;
5959
import org.apache.http.NoHttpResponseException;
6060
import org.apache.http.client.CredentialsProvider;
61-
import org.apache.http.cookie.MalformedCookieException;
6261
import org.htmlunit.attachment.Attachment;
6362
import org.htmlunit.attachment.AttachmentHandler;
6463
import org.htmlunit.csp.Policy;
@@ -77,8 +76,10 @@
7776
import org.htmlunit.html.XHtmlPage;
7877
import org.htmlunit.html.parser.HTMLParser;
7978
import org.htmlunit.html.parser.HTMLParserListener;
79+
import org.htmlunit.http.CookieParser;
8080
import org.htmlunit.http.HttpStatus;
8181
import org.htmlunit.http.HttpUtils;
82+
import org.htmlunit.http.MalformedCookieException;
8283
import org.htmlunit.httpclient.HttpClientConverter;
8384
import org.htmlunit.javascript.AbstractJavaScriptEngine;
8485
import org.htmlunit.javascript.DefaultJavaScriptErrorListener;
@@ -2933,7 +2934,8 @@ public void addCookie(final String cookieString, final URL pageUrl, final Object
29332934
}
29342935

29352936
try {
2936-
final List<Cookie> cookies = HttpClientConverter.parseCookie(cookieString, pageUrl, getBrowserVersion());
2937+
// final List<Cookie> cookies = HttpClientConverter.parseCookie(cookieString, pageUrl, getBrowserVersion());
2938+
final List<Cookie> cookies = CookieParser.parseCookie(cookieString, pageUrl, getBrowserVersion());
29372939

29382940
for (final Cookie cookie : cookies) {
29392941
cookieManager.addCookie(cookie);

0 commit comments

Comments
 (0)