RFC6265CookieSpec.java (httpcomponents-client-4.5.6-src) | : | RFC6265CookieSpec.java (httpcomponents-client-4.5.7-src) | ||
---|---|---|---|---|
skipping to change at line 133 | skipping to change at line 133 | |||
} else { | } else { | |||
final String s = header.getValue(); | final String s = header.getValue(); | |||
if (s == null) { | if (s == null) { | |||
throw new MalformedCookieException("Header value is null"); | throw new MalformedCookieException("Header value is null"); | |||
} | } | |||
buffer = new CharArrayBuffer(s.length()); | buffer = new CharArrayBuffer(s.length()); | |||
buffer.append(s); | buffer.append(s); | |||
cursor = new ParserCursor(0, buffer.length()); | cursor = new ParserCursor(0, buffer.length()); | |||
} | } | |||
final String name = tokenParser.parseToken(buffer, cursor, TOKEN_DELIMS) ; | final String name = tokenParser.parseToken(buffer, cursor, TOKEN_DELIMS) ; | |||
if (name.length() == 0) { | if (name.isEmpty()) { | |||
return Collections.emptyList(); | return Collections.emptyList(); | |||
} | } | |||
if (cursor.atEnd()) { | if (cursor.atEnd()) { | |||
return Collections.emptyList(); | return Collections.emptyList(); | |||
} | } | |||
final int valueDelim = buffer.charAt(cursor.getPos()); | final int valueDelim = buffer.charAt(cursor.getPos()); | |||
cursor.updatePos(cursor.getPos() + 1); | cursor.updatePos(cursor.getPos() + 1); | |||
if (valueDelim != '=') { | if (valueDelim != '=') { | |||
throw new MalformedCookieException("Cookie value is invalid: '" + he ader.toString() + "'"); | throw new MalformedCookieException("Cookie value is invalid: '" + he ader.toString() + "'"); | |||
} | } | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |