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

Commit170dc6e

Browse files
committed
clean up
1 parentfd9f629 commit170dc6e

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

‎src/main/java/com/ning/http/client/cookie/CookieUtil.java‎

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class CookieUtil {
2020

2121
privatestaticfinalBitSetVALID_COOKIE_VALUE_OCTETS =validCookieValueOctets();
2222

23-
privatestaticfinalBitSetVALID_COOKIE_NAME_OCTETS =validCookieNameOctets(VALID_COOKIE_VALUE_OCTETS);
23+
privatestaticfinalBitSetVALID_COOKIE_NAME_OCTETS =validCookieNameOctets();
2424

2525
// cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
2626
// US-ASCII characters excluding CTLs, whitespace, DQUOTE, comma, semicolon, and backslash
@@ -47,30 +47,15 @@ private static BitSet validCookieValueOctets() {
4747
// | "," | ";" | ":" | "\" | <">
4848
// | "/" | "[" | "]" | "?" | "="
4949
// | "{" | "}" | SP | HT
50-
privatestaticBitSetvalidCookieNameOctets(BitSetvalidCookieValueOctets) {
50+
privatestaticBitSetvalidCookieNameOctets() {
5151
BitSetbits =newBitSet(8);
5252
for (inti =32;i <127;i++) {
5353
bits.set(i);
5454
}
55-
bits.set('(',false);
56-
bits.set(')',false);
57-
bits.set('<',false);
58-
bits.set('>',false);
59-
bits.set('@',false);
60-
bits.set(',',false);
61-
bits.set(';',false);
62-
bits.set(':',false);
63-
bits.set('\\',false);
64-
bits.set('"',false);
65-
bits.set('/',false);
66-
bits.set('[',false);
67-
bits.set(']',false);
68-
bits.set('?',false);
69-
bits.set('=',false);
70-
bits.set('{',false);
71-
bits.set('}',false);
72-
bits.set(' ',false);
73-
bits.set('\t',false);
55+
int[]separators =newint[] {'(',')','<','>','@',',',';',':','\\','"','/','[',']','?','=','{','}',' ','\t' };
56+
for (intseparator :separators) {
57+
bits.set(separator,false);
58+
}
7459
returnbits;
7560
}
7661

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp