equal
deleted
inserted
replaced
247 |
247 |
248 cookieMap.put("Cookie", cookieHeader); |
248 cookieMap.put("Cookie", cookieHeader); |
249 return Collections.unmodifiableMap(cookieMap); |
249 return Collections.unmodifiableMap(cookieMap); |
250 } |
250 } |
251 |
251 |
252 |
|
253 public void |
252 public void |
254 put(URI uri, Map<String, List<String>> responseHeaders) |
253 put(URI uri, Map<String, List<String>> responseHeaders) |
255 throws IOException |
254 throws IOException |
256 { |
255 { |
257 // pre-condition check |
256 // pre-condition check |
282 List<HttpCookie> cookies; |
281 List<HttpCookie> cookies; |
283 try { |
282 try { |
284 cookies = HttpCookie.parse(headerValue); |
283 cookies = HttpCookie.parse(headerValue); |
285 } catch (IllegalArgumentException e) { |
284 } catch (IllegalArgumentException e) { |
286 // Bogus header, make an empty list and log the error |
285 // Bogus header, make an empty list and log the error |
287 cookies = java.util.Collections.EMPTY_LIST; |
286 cookies = java.util.Collections.emptyList(); |
288 if (logger.isLoggable(PlatformLogger.SEVERE)) { |
287 if (logger.isLoggable(PlatformLogger.SEVERE)) { |
289 logger.severe("Invalid cookie for " + uri + ": " + headerValue); |
288 logger.severe("Invalid cookie for " + uri + ": " + headerValue); |
290 } |
289 } |
291 } |
290 } |
292 for (HttpCookie cookie : cookies) { |
291 for (HttpCookie cookie : cookies) { |