} else if (header.getName().equalsIgnoreCase(RFC2109Spec.SET_COOKIE_KEY)) { return this.rfc2109.parse(host, port, path, secure, header.getValue()); } else { throw new MalformedCookieException("Header name is not valid. " +
Cookie[] cookies = null; try { cookies = parser.parse( host, conn.getPort(),
String path = uri.getPath(); return cookieSpec.parse(host, port, path, secure, cookieHeaderValue);
} else if (header.getName().equalsIgnoreCase(RFC2109Spec.SET_COOKIE_KEY)) { return this.rfc2109.parse(host, port, path, secure, header.getValue()); } else { throw new MalformedCookieException("Header name is not valid. " +
} else if (header.getName().equalsIgnoreCase(RFC2109Spec.SET_COOKIE_KEY)) { return this.rfc2109.parse(host, port, path, secure, header.getValue()); } else { throw new MalformedCookieException("Header name is not valid. " +
} else if (header.getName().equalsIgnoreCase(RFC2109Spec.SET_COOKIE_KEY)) { return this.rfc2109.parse(host, port, path, secure, header.getValue()); } else { throw new MalformedCookieException("Header name is not valid. " +
} else if (header.getName().equalsIgnoreCase(RFC2109Spec.SET_COOKIE_KEY)) { return this.rfc2109.parse(host, port, path, secure, header.getValue()); } else { throw new MalformedCookieException("Header name is not valid. " +
/** * Parses the cookies from the given connection and stores them in httpState. * Invalid cookies are ignored and logged. */ private void readCookies(IRtXMASessionClient session, URL url,HttpURLConnection conn) { String headerName=""; for(int i=1;headerName!=null;i++) { headerName = conn.getHeaderFieldKey(i); if(Statics.HTTP_SET_COOKIE.equals(headerName)) { try { Cookie[] cookies = cookieSpec.parse(url.getHost(),getPort(url),url.getPath(),"https".equals(url.getProtocol()),conn.getHeaderField(i)); if(cookies!=null) { for(int j=0;j<cookies.length;j++) { try { cookieSpec.validate(url.getHost(),getPort(url),url.getPath(),"https".equals(url.getProtocol()),cookies[j]); getHttpState(session).addCookie(cookies[j]); if(session!=null && "JSESSIONID".equals(cookies[j].getName())) { session.setId(cookies[j].getName()+"="+cookies[j].getValue()); } } catch (MalformedCookieException e) { log_.log(LogLevel.WARNING,"cookie rejected: \""+cookieSpec.formatCookie(cookies[j])+"\". "+e.getMessage()); } } } } catch (MalformedCookieException e) { log_.log(LogLevel.WARNING,"Invalid cookie header: \""+conn.getHeaderField(i)+"\". "+e.getMessage()); } } } }
Cookie[] cookies = null; try { cookies = parser.parse( host, conn.getPort(),
Cookie[] cookies = null; try { cookies = parser.parse( host, conn.getPort(),
Cookie[] cookies = null; try { cookies = parser.parse( host, conn.getPort(),
Cookie[] cookies = null; try { cookies = parser.parse( host, conn.getPort(),
Cookie[] cookies = null; try { cookies = parser.parse( host, conn.getPort(),