Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit486cc11

Browse files
author
oleksiys
committed
[1.8.x] + fix issueAsyncHttpClient#631
AsyncHttpClient#631"Grizzly provider aggressively set cookie missing domain and path to /"
1 parent765d400 commit486cc11

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

‎src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java‎

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,15 +1096,8 @@ private void convertCookies(final Collection<Cookie> cookies,
10961096
finalorg.glassfish.grizzly.http.Cookie[]gCookies) {
10971097
intidx =0;
10981098
for (finalCookiecookie :cookies) {
1099-
finalorg.glassfish.grizzly.http.CookiegCookie =
1100-
neworg.glassfish.grizzly.http.Cookie(cookie.getName(),cookie.getValue());
1101-
gCookie.setDomain(cookie.getDomain());
1102-
gCookie.setPath(cookie.getPath());
1103-
gCookie.setVersion(1);
1104-
gCookie.setMaxAge(cookie.getMaxAge());
1105-
gCookie.setSecure(cookie.isSecure());
1106-
gCookies[idx] =gCookie;
1107-
idx++;
1099+
gCookies[idx++] =neworg.glassfish.grizzly.http.Cookie(
1100+
cookie.getName(),cookie.getValue());
11081101
}
11091102

11101103
}
@@ -1326,7 +1319,7 @@ protected void onInitialLineParsed(HttpHeader httpHeader,
13261319
try {
13271320
context.result(handler.onCompleted());
13281321
context.done();
1329-
}catch (Exceptione) {
1322+
}catch (Throwablee) {
13301323
context.abort(e);
13311324
}
13321325
}
@@ -1459,7 +1452,7 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader,
14591452
"WebSocket protocol error: unexpected HTTP response status during handshake.");
14601453
context.result(null);
14611454
}
1462-
}catch (Exceptione) {
1455+
}catch (Throwablee) {
14631456
httpHeader.setSkipRemainder(true);
14641457
context.abort(e);
14651458
}
@@ -1531,7 +1524,7 @@ protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext c
15311524
if (handler !=null) {
15321525
try {
15331526
context.result(handler.onCompleted());
1534-
}catch (Exceptione) {
1527+
}catch (Throwablee) {
15351528
context.abort(e);
15361529
}
15371530
}else {

‎src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012 Sonatype, Inc. All rights reserved.
2+
* Copyright (c) 2012-2014 Sonatype, Inc. All rights reserved.
33
*
44
* This program is licensed to you under the Apache License Version 2.0,
55
* and you may not use this file except in compliance with the Apache License Version 2.0.
@@ -57,9 +57,4 @@ public void customize(TCPNIOTransport transport, FilterChainBuilder builder) {
5757
@Test(groups = {"standalone","default_provider","async" },enabled =false)
5858
publicvoidasyncDoPostBasicGZIPTest()throwsThrowable {
5959
}
60-
61-
@Test(groups = {"standalone","default_provider","async" },enabled =false)
62-
publicvoidasyncDoGetCookieTest()throwsThrowable {
63-
// FIXME server replies with a foo=bar cookie and yet Grizzly decodes it into foo=value; domain=/; path=/
64-
}
6560
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp