亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cookiespecbase.java

?? 一個基于lucene&heritrix的搜索引擎
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * $Header: /cvsroot/archive-crawler/ArchiveOpenCrawler/src/java/org/apache/commons/httpclient/cookie/CookieSpecBase.java,v 1.2 2005/08/08 19:38:24 gojomo Exp $ * $Revision: 1.2 $ * $Date: 2005/08/08 19:38:24 $ * * ==================================================================== * *  Copyright 2002-2004 The Apache Software Foundation * *  Licensed under the Apache License, Version 2.0 (the "License"); *  you may not use this file except in compliance with the License. *  You may obtain a copy of the License at * *      http://www.apache.org/licenses/LICENSE-2.0 * *  Unless required by applicable law or agreed to in writing, software *  distributed under the License is distributed on an "AS IS" BASIS, *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *  See the License for the specific language governing permissions and *  limitations under the License. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation.  For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.commons.httpclient.cookie;import java.util.Collection;import java.util.Date;import java.util.Iterator;import java.util.LinkedList;import java.util.List;import java.util.SortedMap;import org.apache.commons.httpclient.Cookie;import org.apache.commons.httpclient.Header;import org.apache.commons.httpclient.HeaderElement;import org.apache.commons.httpclient.NameValuePair;import org.apache.commons.httpclient.util.DateParseException;import org.apache.commons.httpclient.util.DateUtil;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import com.sleepycat.collections.StoredIterator;/** *  * Cookie management functions shared by all specification. * * @author  B.C. Holmes * @author <a href="mailto:jericho@thinkfree.com">Park, Sung-Gu</a> * @author <a href="mailto:dsale@us.britannica.com">Doug Sale</a> * @author Rod Waldhoff * @author dIon Gillard * @author Sean C. Sullivan * @author <a href="mailto:JEvans@Cyveillance.com">John Evans</a> * @author Marc A. Saegesser * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a> * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> *  * @since 2.0  */public class CookieSpecBase implements CookieSpec {        /** Log object */    protected static final Log LOG = LogFactory.getLog(CookieSpec.class);    /** Valid date patterns */    private Collection datepatterns = null;        /** Default constructor */    public CookieSpecBase() {        super();    }    /**      * Parses the Set-Cookie value into an array of <tt>Cookie</tt>s.      *      * <P>The syntax for the Set-Cookie response header is:      *      * <PRE>      * set-cookie      =    "Set-Cookie:" cookies      * cookies         =    1#cookie      * cookie          =    NAME "=" VALUE * (";" cookie-av)      * NAME            =    attr      * VALUE           =    value      * cookie-av       =    "Comment" "=" value      *                 |    "Domain" "=" value      *                 |    "Max-Age" "=" value      *                 |    "Path" "=" value      *                 |    "Secure"      *                 |    "Version" "=" 1*DIGIT      * </PRE>      *      * @param host the host from which the <tt>Set-Cookie</tt> value was      * received      * @param port the port from which the <tt>Set-Cookie</tt> value was      * received      * @param path the path from which the <tt>Set-Cookie</tt> value was      * received      * @param secure <tt>true</tt> when the <tt>Set-Cookie</tt> value was      * received over secure conection      * @param header the <tt>Set-Cookie</tt> received from the server      * @return an array of <tt>Cookie</tt>s parsed from the Set-Cookie value      * @throws MalformedCookieException if an exception occurs during parsing      */    public Cookie[] parse(String host, int port, String path,         boolean secure, final String header)         throws MalformedCookieException {                    LOG.trace("enter CookieSpecBase.parse("             + "String, port, path, boolean, Header)");        if (host == null) {            throw new IllegalArgumentException(                "Host of origin may not be null");        }        if (host.trim().equals("")) {            throw new IllegalArgumentException(                "Host of origin may not be blank");        }        if (port < 0) {            throw new IllegalArgumentException("Invalid port: " + port);        }        if (path == null) {            throw new IllegalArgumentException(                "Path of origin may not be null.");        }        if (header == null) {            throw new IllegalArgumentException("Header may not be null.");        }        if (path.trim().equals("")) {            path = PATH_DELIM;        }        host = host.toLowerCase();        String defaultPath = path;            int lastSlashIndex = defaultPath.lastIndexOf(PATH_DELIM);        if (lastSlashIndex >= 0) {            if (lastSlashIndex == 0) {                //Do not remove the very first slash                lastSlashIndex = 1;            }            defaultPath = defaultPath.substring(0, lastSlashIndex);        }        HeaderElement[] headerElements = null;        boolean isNetscapeCookie = false;         int i1 = header.toLowerCase().indexOf("expires=");        if (i1 != -1) {            i1 += "expires=".length();            int i2 = header.indexOf(";", i1);            if (i2 == -1) {                i2 = header.length();             }            try {                DateUtil.parseDate(header.substring(i1, i2), this.datepatterns);                isNetscapeCookie = true;             } catch (DateParseException e) {                // Does not look like a valid expiry date            }        }        if (isNetscapeCookie) {            headerElements = new HeaderElement[] {                    new HeaderElement(header.toCharArray())            };        } else {            headerElements = HeaderElement.parseElements(header.toCharArray());        }                Cookie[] cookies = new Cookie[headerElements.length];        for (int i = 0; i < headerElements.length; i++) {            HeaderElement headerelement = headerElements[i];            Cookie cookie = null;            try {                cookie = new Cookie(host,                                    headerelement.getName(),                                    headerelement.getValue(),                                    defaultPath,                                     null,                                    false);            } catch (IllegalArgumentException e) {                throw new MalformedCookieException(e.getMessage());             }            // cycle through the parameters            NameValuePair[] parameters = headerelement.getParameters();            // could be null. In case only a header element and no parameters.            if (parameters != null) {                for (int j = 0; j < parameters.length; j++) {                    parseAttribute(parameters[j], cookie);                }            }            cookies[i] = cookie;        }        return cookies;    }    /**      * Parse the <tt>"Set-Cookie"</tt> {@link Header} into an array of {@link      * Cookie}s.      *      * <P>The syntax for the Set-Cookie response header is:      *      * <PRE>      * set-cookie      =    "Set-Cookie:" cookies      * cookies         =    1#cookie      * cookie          =    NAME "=" VALUE * (";" cookie-av)      * NAME            =    attr      * VALUE           =    value      * cookie-av       =    "Comment" "=" value      *                 |    "Domain" "=" value      *                 |    "Max-Age" "=" value      *                 |    "Path" "=" value      *                 |    "Secure"      *                 |    "Version" "=" 1*DIGIT      * </PRE>      *      * @param host the host from which the <tt>Set-Cookie</tt> header was      * received      * @param port the port from which the <tt>Set-Cookie</tt> header was      * received      * @param path the path from which the <tt>Set-Cookie</tt> header was      * received      * @param secure <tt>true</tt> when the <tt>Set-Cookie</tt> header was      * received over secure conection      * @param header the <tt>Set-Cookie</tt> received from the server      * @return an array of <tt>Cookie</tt>s parsed from the <tt>"Set-Cookie"      * </tt> header      * @throws MalformedCookieException if an exception occurs during parsing      */    public Cookie[] parse(        String host, int port, String path, boolean secure, final Header header)        throws MalformedCookieException {                    LOG.trace("enter CookieSpecBase.parse("            + "String, port, path, boolean, String)");        if (header == null) {            throw new IllegalArgumentException("Header may not be null.");        }        return parse(host, port, path, secure, header.getValue());    }    /**      * Parse the cookie attribute and update the corresponsing {@link Cookie}      * properties.      *      * @param attribute {@link HeaderElement} cookie attribute from the      * <tt>Set- Cookie</tt>      * @param cookie {@link Cookie} to be updated      * @throws MalformedCookieException if an exception occurs during parsing      */    public void parseAttribute(        final NameValuePair attribute, final Cookie cookie)        throws MalformedCookieException {                    if (attribute == null) {            throw new IllegalArgumentException("Attribute may not be null.");        }        if (cookie == null) {            throw new IllegalArgumentException("Cookie may not be null.");        }        final String paramName = attribute.getName().toLowerCase();        String paramValue = attribute.getValue();        if (paramName.equals("path")) {            if ((paramValue == null) || (paramValue.trim().equals(""))) {                paramValue = "/";            }            cookie.setPath(paramValue);            cookie.setPathAttributeSpecified(true);        } else if (paramName.equals("domain")) {            if (paramValue == null) {                throw new MalformedCookieException(                    "Missing value for domain attribute");            }            if (paramValue.trim().equals("")) {                throw new MalformedCookieException(                    "Blank value for domain attribute");            }            cookie.setDomain(paramValue);            cookie.setDomainAttributeSpecified(true);        } else if (paramName.equals("max-age")) {            if (paramValue == null) {                throw new MalformedCookieException(                    "Missing value for max-age attribute");            }            int age;            try {                age = Integer.parseInt(paramValue);            } catch (NumberFormatException e) {                throw new MalformedCookieException ("Invalid max-age "                    + "attribute: " + e.getMessage());            }            cookie.setExpiryDate(                new Date(System.currentTimeMillis() + age * 1000L));        } else if (paramName.equals("secure")) {            cookie.setSecure(true);        } else if (paramName.equals("comment")) {            cookie.setComment(paramValue);        } else if (paramName.equals("expires")) {            if (paramValue == null) {                throw new MalformedCookieException(                    "Missing value for expires attribute");            }            try {                cookie.setExpiryDate(DateUtil.parseDate(paramValue, this.datepatterns));            } catch (DateParseException dpe) {                LOG.debug("Error parsing cookie date", dpe);                throw new MalformedCookieException(                    "Unable to parse expiration date parameter: "                     + paramValue);            }        } else {            if (LOG.isDebugEnabled()) {                LOG.debug("Unrecognized cookie attribute: "                     + attribute.toString());            }        }    }        public Collection getValidDateFormats() {        return this.datepatterns;    }    public void setValidDateFormats(final Collection datepatterns) {        this.datepatterns = datepatterns;    }    /**      * Performs most common {@link Cookie} validation      *      * @param host the host from which the {@link Cookie} was received

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成人精品在线观看| 日韩亚洲欧美高清| 亚洲欧美日韩国产另类专区| 99在线精品视频| 一区二区三区四区av| 色八戒一区二区三区| 亚洲国产人成综合网站| 欧美精选一区二区| 麻豆成人综合网| 国产亚洲精品超碰| 成人v精品蜜桃久久一区| 亚洲免费观看高清完整版在线| jizzjizzjizz欧美| 亚洲国产日韩精品| 亚洲精品一区二区三区影院| 国产ts人妖一区二区| 亚洲激情一二三区| 日韩欧美国产1| 国产·精品毛片| 亚洲在线一区二区三区| 欧美一区二区播放| 不卡一区中文字幕| 婷婷综合久久一区二区三区| 久久美女高清视频| 欧美在线免费观看亚洲| 蜜桃精品视频在线观看| 亚洲国产电影在线观看| 欧美亚洲国产一区二区三区| 久久国产婷婷国产香蕉| 一区二区中文视频| 日韩欧美一区二区在线视频| 懂色中文一区二区在线播放| 亚洲一线二线三线久久久| 久久久一区二区| 欧美日韩不卡视频| 丰满亚洲少妇av| 日本麻豆一区二区三区视频| 中文字幕一区二区三| 欧美一区二区久久| 色综合天天性综合| 精品一区二区影视| 亚洲国产另类av| 久久久一区二区三区捆绑**| 欧美日韩激情一区二区| 不卡的电视剧免费网站有什么| 午夜精品成人在线| 中文字幕亚洲电影| 日韩欧美综合一区| 欧美吻胸吃奶大尺度电影| 国产99久久久久久免费看农村| 亚洲成人免费影院| 中文字幕一区二区在线播放| 亚洲精品在线网站| 日韩视频一区二区在线观看| 欧美在线一二三四区| 97超碰欧美中文字幕| 国内精品第一页| 美脚の诱脚舐め脚责91| 亚洲国产成人av好男人在线观看| 国产欧美久久久精品影院| 欧美一区二区三区色| 欧美日韩视频在线观看一区二区三区| 成人精品国产一区二区4080| 国产一区二区免费在线| 日韩不卡一二三区| 亚洲高清免费视频| 悠悠色在线精品| 亚洲精品视频免费看| 国产精品麻豆欧美日韩ww| 久久免费精品国产久精品久久久久| 日韩午夜三级在线| 777色狠狠一区二区三区| 欧美日韩在线播| 欧美私模裸体表演在线观看| 91偷拍与自偷拍精品| 99热99精品| 97久久久精品综合88久久| 成人av网在线| 91色综合久久久久婷婷| 91色porny蝌蚪| 色哟哟一区二区在线观看| 99久久精品费精品国产一区二区| 粉嫩嫩av羞羞动漫久久久 | 亚洲va欧美va天堂v国产综合| 亚洲色图欧洲色图| 一区二区三区免费| 亚洲国产精品久久久男人的天堂| 一区二区三区在线免费播放| 一区二区三区四区av| 亚洲成人高清在线| 毛片不卡一区二区| 国产一区二区久久| 成人美女视频在线看| 色婷婷综合久久久久中文一区二区 | 奇米一区二区三区| 久久99久久精品欧美| 国产一区二区三区综合| 成人avav在线| 欧美日韩在线三区| 日韩欧美另类在线| 欧美激情一区二区在线| 亚洲免费成人av| 日韩中文字幕亚洲一区二区va在线| 日韩成人精品在线观看| 国产福利一区二区三区| 91美女精品福利| 91精品婷婷国产综合久久竹菊| 日韩精品一区二区三区视频播放 | 久久国产视频网| 岛国一区二区在线观看| 在线观看视频一区二区欧美日韩| 91精品国产综合久久精品麻豆| 久久久欧美精品sm网站| 综合久久久久久| 午夜成人免费电影| 成人午夜视频免费看| 欧美日韩成人激情| 欧美经典三级视频一区二区三区| 一区二区三区日韩精品| 久久99久久精品欧美| 91黄色在线观看| 日韩亚洲国产中文字幕欧美| 最新久久zyz资源站| 久久精品国产免费| 日本精品视频一区二区三区| 欧美成人官网二区| 一级做a爱片久久| 激情久久五月天| 一本大道久久a久久精二百| ww久久中文字幕| 亚洲二区在线观看| 成人av片在线观看| 欧美一级日韩不卡播放免费| 18成人在线观看| 精品一区二区三区香蕉蜜桃| 在线视频一区二区三区| 久久久久97国产精华液好用吗| 亚洲国产人成综合网站| 白白色 亚洲乱淫| 精品国产免费久久| 亚洲v精品v日韩v欧美v专区| k8久久久一区二区三区| 久久夜色精品一区| 五月婷婷欧美视频| 91麻豆文化传媒在线观看| 国产日本欧洲亚洲| 久久精品国产77777蜜臀| 欧美日韩一区 二区 三区 久久精品| 国产三级欧美三级日产三级99 | 91在线国产福利| 久久综合九色综合久久久精品综合| 亚洲自拍偷拍九九九| 成人成人成人在线视频| 久久精品欧美一区二区三区不卡| 图片区小说区国产精品视频| 91精品福利在线| 国产精品久久久久一区二区三区共| 久久精品99久久久| 日韩欧美一区二区视频| 亚州成人在线电影| 欧美天堂亚洲电影院在线播放| 亚洲人成人一区二区在线观看| 成人手机电影网| 国产午夜精品理论片a级大结局| 久久er精品视频| 欧美r级在线观看| 国产原创一区二区三区| 久久综合狠狠综合久久综合88| 久久99精品久久久久久久久久久久| 欧美精品久久久久久久久老牛影院| 亚洲一区二区精品久久av| 在线看日本不卡| 一二三区精品福利视频| 欧日韩精品视频| 亚洲成人福利片| 日韩一级片在线观看| 蜜臀久久久99精品久久久久久| 日韩一区二区电影| 国内精品自线一区二区三区视频| 日韩欧美在线不卡| 国产精品1区2区3区在线观看| 久久精品在这里| av色综合久久天堂av综合| 亚洲精品写真福利| 666欧美在线视频| 韩国午夜理伦三级不卡影院| 国产视频一区在线播放| 91亚洲午夜精品久久久久久| 亚洲综合精品自拍| 日韩免费性生活视频播放| 国模少妇一区二区三区| 中文字幕精品综合| 欧美最猛黑人xxxxx猛交| 爽好久久久欧美精品| 日韩精品中文字幕在线一区| 国产不卡视频在线播放| 亚洲激情av在线| 日韩欧美国产综合在线一区二区三区 | 亚洲成av人影院| 亚洲精品一区二区三区精华液 |