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

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

?? cookiespecbase.java

?? 高性能分詞算法
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
      * @param port the port from which the {@link Cookie} was received      * @param path the path from which the {@link Cookie} was received      * @param secure <tt>true</tt> when the {@link Cookie} was received using a      * secure connection      * @param cookie The cookie to validate.      * @throws MalformedCookieException if an exception occurs during      * validation      */        public void validate(String host, int port, String path,         boolean secure, final Cookie cookie)         throws MalformedCookieException {                    LOG.trace("enter CookieSpecBase.validate("            + "String, port, path, boolean, Cookie)");        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 (path.trim().equals("")) {            path = PATH_DELIM;        }        host = host.toLowerCase();        // check version        if (cookie.getVersion() < 0) {            throw new MalformedCookieException ("Illegal version number "                 + cookie.getValue());        }        // security check... we musn't allow the server to give us an        // invalid domain scope        // Validate the cookies domain attribute.  NOTE:  Domains without         // any dots are allowed to support hosts on private LANs that don't         // have DNS names.  Since they have no dots, to domain-match the         // request-host and domain must be identical for the cookie to sent         // back to the origin-server.        if (host.indexOf(".") >= 0) {            // Not required to have at least two dots.  RFC 2965.            // A Set-Cookie2 with Domain=ajax.com will be accepted.            // domain must match host            if (!host.endsWith(cookie.getDomain())) {                String s = cookie.getDomain();                if (s.startsWith(".")) {                    s = s.substring(1, s.length());                }                if (!host.equals(s)) {                     throw new MalformedCookieException(                        "Illegal domain attribute \"" + cookie.getDomain()                         + "\". Domain of origin: \"" + host + "\"");                }            }        } else {            if (!host.equals(cookie.getDomain())) {                throw new MalformedCookieException(                    "Illegal domain attribute \"" + cookie.getDomain()                     + "\". Domain of origin: \"" + host + "\"");            }        }        // another security check... we musn't allow the server to give us a        // cookie that doesn't match this path        if (!path.startsWith(cookie.getPath())) {            throw new MalformedCookieException(                "Illegal path attribute \"" + cookie.getPath()                 + "\". Path of origin: \"" + path + "\"");        }    }    /**     * Return <tt>true</tt> if the cookie should be submitted with a request     * with given attributes, <tt>false</tt> otherwise.     * @param host the host to which the request is being submitted     * @param port the port to which the request is being submitted (ignored)     * @param path the path to which the request is being submitted     * @param secure <tt>true</tt> if the request is using a secure connection     * @param cookie {@link Cookie} to be matched     * @return true if the cookie matches the criterium     */    public boolean match(String host, int port, String path,         boolean secure, final Cookie cookie) {                    LOG.trace("enter CookieSpecBase.match("            + "String, int, String, boolean, Cookie");                    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 (cookie == null) {            throw new IllegalArgumentException("Cookie may not be null");        }        if (path.trim().equals("")) {            path = PATH_DELIM;        }        host = host.toLowerCase();        if (cookie.getDomain() == null) {            LOG.warn("Invalid cookie state: domain not specified");            return false;        }        if (cookie.getPath() == null) {            LOG.warn("Invalid cookie state: path not specified");            return false;        }                return            // only add the cookie if it hasn't yet expired             (cookie.getExpiryDate() == null                 || cookie.getExpiryDate().after(new Date()))            // and the domain pattern matches             && (domainMatch(host, cookie.getDomain()))            // and the path is null or matching            && (pathMatch(path, cookie.getPath()))            // and if the secure flag is set, only if the request is             // actually secure             && (cookie.getSecure() ? secure : true);          }    /**     * Performs domain-match as implemented in common browsers.     * @param host The target host.     * @param domain The cookie domain attribute.     * @return true if the specified host matches the given domain.     */    public boolean domainMatch(final String host, String domain) {        if (host.equals(domain)) {            return true;        }        if (!domain.startsWith(".")) {            domain = "." + domain;        }        return host.endsWith(domain) || host.equals(domain.substring(1));    }    /**     * Performs path-match as implemented in common browsers.     * @param path The target path.     * @param topmostPath The cookie path attribute.     * @return true if the paths match     */    public boolean pathMatch(final String path, final String topmostPath) {        boolean match = path.startsWith (topmostPath);        // if there is a match and these values are not exactly the same we have        // to make sure we're not matcing "/foobar" and "/foo"        if (match && path.length() != topmostPath.length()) {            if (!topmostPath.endsWith(PATH_DELIM)) {                match = (path.charAt(topmostPath.length()) == PATH_DELIM_CHAR);            }        }        return match;    }    /**     * Return an array of {@link Cookie}s that should be submitted with a     * request with given attributes, <tt>false</tt> otherwise.     * @param host the host to which the request is being submitted     * @param port the port to which the request is being submitted (currently     * ignored)     * @param path the path to which the request is being submitted     * @param secure <tt>true</tt> if the request is using a secure protocol     * @param cookies an array of <tt>Cookie</tt>s to be matched     * @return an array of <tt>Cookie</tt>s matching the criterium     * // BEGIN IA/HERITRIX CHANGES     * @deprecated use match(String, int, String, boolean, SortedMap)// END IA/HERITRIX CHANGES     */    public Cookie[] match(String host, int port, String path,         boolean secure, final Cookie cookies[]) {                    LOG.trace("enter CookieSpecBase.match("            + "String, int, String, boolean, Cookie[])");        if (cookies == null) {            return null;        }        List matching = new LinkedList();        for (int i = 0; i < cookies.length; i++) {            if (match(host, port, path, secure, cookies[i])) {                addInPathOrder(matching, cookies[i]);            }        }        return (Cookie[]) matching.toArray(new Cookie[matching.size()]);    }//  BEGIN IA/HERITRIX CHANGES    /**     * Return an array of {@link Cookie}s that should be submitted with a     * request with given attributes, <tt>false</tt> otherwise.      *      * If the SortedMap comes from an HttpState and is not itself     * thread-safe, it may be necessary to synchronize on the HttpState     * instance to protect against concurrent modification.      *     * @param host the host to which the request is being submitted     * @param port the port to which the request is being submitted (currently     * ignored)     * @param path the path to which the request is being submitted     * @param secure <tt>true</tt> if the request is using a secure protocol     * @param cookies SortedMap of <tt>Cookie</tt>s to be matched     * @return an array of <tt>Cookie</tt>s matching the criterium     */    public Cookie[] match(String host, int port, String path,         boolean secure, final SortedMap cookies) {                    LOG.trace("enter CookieSpecBase.match("           + "String, int, String, boolean, SortedMap)");        // TODO: skip meaningless 'narrowing' when host is a numeric IP        // (harmless in the meantime)                if (cookies == null) {            return null;        }        List matching = new LinkedList();        String narrowHost = host;        do {            Iterator iter = cookies.subMap(narrowHost,                    narrowHost + Cookie.DOMAIN_OVERBOUNDS).values().iterator();            while (iter.hasNext()) {                Cookie cookie = (Cookie) (iter.next());                if (match(host, port, path, secure, cookie)) {                    addInPathOrder(matching, cookie);                }            }            StoredIterator.close(iter);            int trimTo = narrowHost.indexOf('.', 1);            narrowHost = (trimTo < 0) ? null : narrowHost.substring(trimTo+1);        } while (narrowHost != null);        return (Cookie[]) matching.toArray(new Cookie[matching.size()]);     }//  END IA/HERITRIX CHANGES        /**     * Adds the given cookie into the given list in descending path order. That     * is, more specific path to least specific paths.  This may not be the     * fastest algorythm, but it'll work OK for the small number of cookies     * we're generally dealing with.     *     * @param list - the list to add the cookie to     * @param addCookie - the Cookie to add to list     */    private static void addInPathOrder(List list, Cookie addCookie) {        int i = 0;        for (i = 0; i < list.size(); i++) {            Cookie c = (Cookie) list.get(i);            if (addCookie.compare(addCookie, c) > 0) {                break;            }        }        list.add(i, addCookie);    }    /**     * Return a string suitable for sending in a <tt>"Cookie"</tt> header     * @param cookie a {@link Cookie} to be formatted as string     * @return a string suitable for sending in a <tt>"Cookie"</tt> header.     */    public String formatCookie(Cookie cookie) {        LOG.trace("enter CookieSpecBase.formatCookie(Cookie)");        if (cookie == null) {            throw new IllegalArgumentException("Cookie may not be null");        }        StringBuffer buf = new StringBuffer();        buf.append(cookie.getName());        buf.append("=");        String s = cookie.getValue();        if (s != null) {            buf.append(s);        }        return buf.toString();    }    /**     * Create a <tt>"Cookie"</tt> header value containing all {@link Cookie}s in     * <i>cookies</i> suitable for sending in a <tt>"Cookie"</tt> header     * @param cookies an array of {@link Cookie}s to be formatted     * @return a string suitable for sending in a Cookie header.     * @throws IllegalArgumentException if an input parameter is illegal     */    public String formatCookies(Cookie[] cookies)      throws IllegalArgumentException {        LOG.trace("enter CookieSpecBase.formatCookies(Cookie[])");        if (cookies == null) {            throw new IllegalArgumentException("Cookie array may not be null");        }        if (cookies.length == 0) {            throw new IllegalArgumentException("Cookie array may not be empty");        }        StringBuffer buffer = new StringBuffer();        for (int i = 0; i < cookies.length; i++) {            if (i > 0) {                buffer.append("; ");            }            buffer.append(formatCookie(cookies[i]));        }        return buffer.toString();    }    /**     * Create a <tt>"Cookie"</tt> {@link Header} containing all {@link Cookie}s     * in <i>cookies</i>.     * @param cookies an array of {@link Cookie}s to be formatted as a <tt>"     * Cookie"</tt> header     * @return a <tt>"Cookie"</tt> {@link Header}.     */    public Header formatCookieHeader(Cookie[] cookies) {        LOG.trace("enter CookieSpecBase.formatCookieHeader(Cookie[])");        return new Header("Cookie", formatCookies(cookies));    }    /**     * Create a <tt>"Cookie"</tt> {@link Header} containing the {@link Cookie}.     * @param cookie <tt>Cookie</tt>s to be formatted as a <tt>Cookie</tt>     * header     * @return a Cookie header.     */    public Header formatCookieHeader(Cookie cookie) {        LOG.trace("enter CookieSpecBase.formatCookieHeader(Cookie)");        return new Header("Cookie", formatCookie(cookie));    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费在线观看一区二区三区| 老司机精品视频在线| 天天色天天操综合| 国产精品91一区二区| 在线观看精品一区| 亚洲图片另类小说| 国产伦精品一区二区三区视频青涩 | 欧美视频一区在线| 成人国产精品免费网站| 欧美一区二区三区不卡| 石原莉奈在线亚洲三区| 国产精品久久久久久一区二区三区| 国内精品伊人久久久久av一坑| 久久中文娱乐网| 在线一区二区视频| 成人午夜私人影院| 日本午夜精品一区二区三区电影| 视频一区二区欧美| 中文字幕一区二区三区不卡在线| 欧美精品在线视频| 五月激情综合网| 欧美无砖砖区免费| 亚洲国产日韩一级| 一本大道av一区二区在线播放| 久久久亚洲精华液精华液精华液| 18成人在线观看| 亚洲电影在线播放| 欧美日韩aaaaaa| 亚洲成人自拍网| 欧美日韩成人高清| 日韩精品国产精品| 欧美大黄免费观看| 国产精品夜夜嗨| 136国产福利精品导航| 成人激情文学综合网| 亚洲情趣在线观看| 欧美亚洲动漫制服丝袜| 亚洲妇女屁股眼交7| 91天堂素人约啪| 亚洲一级不卡视频| xnxx国产精品| 欧美三级日韩三级| 久久精品国产亚洲高清剧情介绍| 日本一区二区三区在线观看| 91福利国产成人精品照片| 国产福利一区二区| 国产综合久久久久影院| 亚洲与欧洲av电影| 成人综合婷婷国产精品久久蜜臀 | 欧美日韩情趣电影| 日韩免费成人网| 一区二区三区在线看| 91在线观看污| 成人免费高清在线| 成人app软件下载大全免费| 99精品桃花视频在线观看| 成人在线综合网站| 欧美日韩精品欧美日韩精品一| 欧美另类videos死尸| 色综合久久久久久久| 美女网站色91| 亚洲免费在线观看视频| 欧美精品一区二区久久久| 在线看国产日韩| 国产一区二区三区四| 中文字幕亚洲欧美在线不卡| 精品国精品国产| 欧美日韩另类一区| 日本精品免费观看高清观看| 免费在线看一区| 亚洲国产精品久久不卡毛片| 亚洲精选一二三| 中文字幕不卡的av| 欧美日韩情趣电影| 欧美午夜宅男影院| a亚洲天堂av| 成人污污视频在线观看| 国产成人在线免费观看| 黄色小说综合网站| 极品少妇一区二区三区精品视频| 国产激情一区二区三区| 91影院在线观看| 91成人看片片| 亚洲欧美影音先锋| 一级女性全黄久久生活片免费| 国产.精品.日韩.另类.中文.在线.播放 | 国产精品美女久久久久aⅴ| 一区二区三区精品久久久| 亚洲国产精品久久久男人的天堂 | 日韩电影在线免费观看| 久久精品国产一区二区三| 久久精品在线免费观看| 91久久精品日日躁夜夜躁欧美| 欧美午夜精品久久久| 在线免费观看日本欧美| 久久久久久久久97黄色工厂| 亚洲午夜久久久| 高清不卡在线观看av| 日韩午夜激情免费电影| 一区二区三区不卡视频| 在线观看日韩av先锋影音电影院| 亚洲精品一区二区三区99| 亚洲综合免费观看高清完整版| 亚洲综合区在线| 国产综合色产在线精品| 欧美一级欧美三级| 一区二区国产视频| 99视频一区二区| 精品国产一区二区三区av性色| 午夜国产不卡在线观看视频| av午夜精品一区二区三区| 日韩欧美激情一区| 天天免费综合色| 欧美在线你懂得| 亚洲精选一二三| 欧美日韩一区二区不卡| 亚洲久草在线视频| 色婷婷综合久色| 日韩伦理av电影| 在线视频你懂得一区二区三区| 国产精品网站在线播放| 成人性生交大片免费看在线播放| 久久先锋资源网| 国产成人小视频| 国产精品久久久久久亚洲伦 | 色婷婷久久久久swag精品| 中文一区二区在线观看| 99在线精品观看| 九色|91porny| 日韩精品久久久久久| 亚洲免费观看在线视频| 国产色综合一区| 久久久久久久久久久黄色| 欧美电视剧免费观看| 欧美日韩在线免费视频| 天涯成人国产亚洲精品一区av| 美女在线视频一区| 精品久久久久久久久久久久包黑料| 全部av―极品视觉盛宴亚洲| 国产亚洲1区2区3区| 国产精品久久久久婷婷二区次| 一区二区在线观看av| 九九九精品视频| av动漫一区二区| 中文字幕在线不卡一区二区三区| 成人一区二区三区视频 | 久久精品日产第一区二区三区高清版 | 国产精品久久午夜夜伦鲁鲁| 不卡的电视剧免费网站有什么| 国产二区国产一区在线观看| 一区在线观看视频| 欧美精品少妇一区二区三区| 国产一区二区不卡在线| 午夜欧美大尺度福利影院在线看| 久久久国产综合精品女国产盗摄| 91麻豆国产自产在线观看| 粉嫩一区二区三区在线看| 亚洲精品国产品国语在线app| 久久先锋影音av鲁色资源| 欧美日韩一级视频| 91福利区一区二区三区| 国产成人自拍网| 国产麻豆视频一区| 奇米亚洲午夜久久精品| 一区二区三区国产精华| 国产精品久久毛片av大全日韩| 欧美一区二区女人| 欧美日韩中文字幕一区| 色综合 综合色| 日本高清不卡在线观看| 91国模大尺度私拍在线视频| caoporn国产一区二区| 成人妖精视频yjsp地址| 中文字幕国产一区| 中日韩av电影| 一个色在线综合| 亚洲成人av资源| 欧美a一区二区| 在线视频你懂得一区二区三区| 欧美在线你懂得| 欧美国产综合色视频| 丁香网亚洲国际| 欧美日韩国产成人在线91| 美女在线视频一区| 欧美精品一卡两卡| 久久精品网站免费观看| 五月天网站亚洲| 日日嗨av一区二区三区四区| 亚洲日本在线天堂| 一区二区三区成人| 久久爱www久久做| 国产成人av电影在线播放| 337p日本欧洲亚洲大胆色噜噜| 91社区在线播放| 捆绑调教一区二区三区| 亚洲视频在线一区| 欧美tickling网站挠脚心| 欧美中文字幕不卡| 成人国产亚洲欧美成人综合网| 日本女人一区二区三区|