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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cookiespecbase.java

?? Light in the box 抓取程序。 使用HttpClient
?? JAVA
?? 第 1 頁 / 共 2 頁
字號(hào):
/* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/cookie/CookieSpecBase.java,v 1.28 2004/11/06 19:15:42 mbecke Exp $ * $Revision: 480424 $ * $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ * * ==================================================================== * *  Licensed to the Apache Software Foundation (ASF) under one or more *  contributor license agreements.  See the NOTICE file distributed with *  this work for additional information regarding copyright ownership. *  The ASF licenses this file to You 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.LinkedList;import java.util.List;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;/** *  * 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);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩色在线观看| 国产丝袜在线精品| 国产精品久久福利| 伦理电影国产精品| 欧美日韩精品欧美日韩精品一| 国产精品久久久久一区二区三区共| 欧美性一区二区| 亚洲欧美欧美一区二区三区| 丁香婷婷综合五月| 国产欧美一区二区精品性色超碰| 国产成人av资源| 国产精品视频在线看| 不卡一二三区首页| 亚洲美女免费在线| 久久久99精品免费观看不卡| 欧美日韩国产一二三| 色先锋aa成人| 亚洲大片精品永久免费| 欧美日韩高清一区二区不卡| 成人精品在线视频观看| 一区二区高清在线| 欧美精品第一页| 极品尤物av久久免费看| 国产婷婷色一区二区三区四区| 欧美一区二区高清| fc2成人免费人成在线观看播放 | 国产一区在线视频| 久久久精品人体av艺术| 成人午夜在线播放| 韩国一区二区视频| 一区二区三区成人| 伊人夜夜躁av伊人久久| 欧美变态tickle挠乳网站| 国产乱色国产精品免费视频| 亚洲丝袜制服诱惑| 日韩欧美一区在线| 国产精品 欧美精品| 麻豆91在线播放免费| 日本一区二区综合亚洲| 久久精品综合网| 久久精品日产第一区二区三区高清版 | 欧美三级日韩三级国产三级| 久久爱www久久做| 麻豆成人久久精品二区三区红| 香蕉影视欧美成人| 午夜精品久久久久久久99樱桃| 久久综合久久综合久久综合| 欧美在线视频日韩| 韩国成人在线视频| 理论电影国产精品| 免费观看91视频大全| 中文字幕日本不卡| 日韩精品中文字幕在线不卡尤物| 欧美一级久久久久久久大片| 欧美mv日韩mv| 久久日一线二线三线suv| 国产日韩欧美综合在线| 日本一区二区成人在线| 日韩一区二区三免费高清| 日韩美女天天操| 国产色婷婷亚洲99精品小说| 国产精品萝li| 亚洲精品va在线观看| 亚洲一区二区三区四区在线免费观看| 久久精品人人爽人人爽| 最新久久zyz资源站| 亚洲国产中文字幕在线视频综合| 国产精品麻豆一区二区| 亚洲一区在线观看免费 | 日韩欧美色综合| 精品久久国产97色综合| 国产精品毛片高清在线完整版 | 日韩国产欧美在线视频| 亚洲精品中文字幕乱码三区| 亚洲高清免费在线| 久久99久久久欧美国产| aaa欧美色吧激情视频| 欧美久久一二区| 国产婷婷色一区二区三区| 亚洲线精品一区二区三区八戒| 青青草精品视频| 99久久久无码国产精品| 成人午夜电影久久影院| 欧美午夜精品一区| 久久老女人爱爱| 亚洲韩国精品一区| 成人性生交大片免费看中文| 欧美日韩一级大片网址| 国产午夜亚洲精品理论片色戒| 亚洲一区在线看| 成人亚洲一区二区一| 日韩欧美国产成人一区二区| 亚洲精品写真福利| 国内精品不卡在线| 欧美又粗又大又爽| 欧美国产欧美亚州国产日韩mv天天看完整| 一区二区国产盗摄色噜噜| 国产91丝袜在线观看| 欧美一级免费大片| 亚洲精品国产a久久久久久| 国产乱妇无码大片在线观看| 欧洲国内综合视频| 日本一区二区三区国色天香 | 丝袜亚洲另类丝袜在线| 青青草原综合久久大伊人精品 | 欧美日韩精品免费观看视频| 国产精品情趣视频| 久久成人免费网站| 欧美美女激情18p| 亚洲天天做日日做天天谢日日欢| 国内精品久久久久影院薰衣草| 欧美日本精品一区二区三区| 亚洲欧美日韩电影| www.综合网.com| 国产免费成人在线视频| 国产精品一区二区久久精品爱涩 | 国产精品一区二区三区99| 欧美一区二区在线视频| 亚洲gay无套男同| 色综合色狠狠综合色| 国产精品久久久久aaaa| 国产不卡视频在线播放| 久久久久国产精品麻豆| 九九视频精品免费| 日韩一区二区三区免费看 | 91尤物视频在线观看| 欧美另类高清zo欧美| 一区二区成人在线视频| 不卡的av电影| 国产精品灌醉下药二区| 成人精品视频一区| 国产精品色婷婷久久58| 国产成人综合视频| 久久精品一区二区三区四区| 国产精品一二二区| 国产日韩精品久久久| 国产一区二区h| 国产亚洲精品bt天堂精选| 国产成人免费在线观看| 亚洲国产精品成人综合色在线婷婷| 国产盗摄一区二区三区| 久久精品在线免费观看| 成人av在线一区二区三区| 国产精品久久久久久久久快鸭| a4yy欧美一区二区三区| 中文字幕一区二区三区在线播放| 99视频精品全部免费在线| 亚洲天堂网中文字| 91高清在线观看| 亚洲国产精品激情在线观看| 99久久综合国产精品| 亚洲免费观看高清在线观看| 色婷婷久久久亚洲一区二区三区| 亚洲美女精品一区| 欧美日韩你懂的| 久久精品免费观看| 久久久久亚洲蜜桃| av午夜精品一区二区三区| 亚洲综合色网站| 日韩亚洲欧美一区二区三区| 免费人成在线不卡| 国产午夜一区二区三区| 91老司机福利 在线| 亚洲午夜av在线| 精品免费一区二区三区| 高清shemale亚洲人妖| 一区二区久久久久| 日韩午夜小视频| 成人免费av在线| 亚洲风情在线资源站| 精品国内片67194| 麻豆精品在线播放| 国产精品乱人伦中文| 欧美性做爰猛烈叫床潮| 极品少妇xxxx偷拍精品少妇| 国产视频一区在线播放| 欧美日本一区二区| 成人综合在线视频| 午夜欧美电影在线观看| 国产亚洲综合性久久久影院| 色综合久久综合网| 久久国产尿小便嘘嘘尿| 亚洲视频电影在线| 一区二区三区四区精品在线视频 | 成人h动漫精品一区二| 亚洲国产aⅴ天堂久久| 久久亚洲综合色一区二区三区| 99精品一区二区三区| 六月丁香综合在线视频| 亚洲精品免费在线观看| 亚洲精品在线免费播放| 欧美影视一区在线| 国产成人精品免费一区二区| 午夜久久电影网| 自拍偷拍国产亚洲| 久久久精品日韩欧美| 欧美一区二区在线看| 欧亚洲嫩模精品一区三区| 不卡av在线免费观看| 寂寞少妇一区二区三区|