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

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

?? httpmethodbase.java

?? 一個基于lucene&heritrix的搜索引擎
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/* * $Header: /cvsroot/archive-crawler/ArchiveOpenCrawler/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v 1.10 2005/08/12 23:42:58 gojomo Exp $ * $Revision: 1.10 $ * $Date: 2005/08/12 23:42:58 $ * * ==================================================================== * *  Copyright 1999-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;import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.InterruptedIOException;import java.util.Arrays;import java.util.Collection;import java.util.HashSet;import org.apache.commons.httpclient.auth.AuthState;import org.apache.commons.httpclient.cookie.CookiePolicy;import org.apache.commons.httpclient.cookie.CookieSpec;import org.apache.commons.httpclient.cookie.MalformedCookieException;import org.apache.commons.httpclient.params.HttpMethodParams;import org.apache.commons.httpclient.protocol.Protocol;import org.apache.commons.httpclient.util.EncodingUtil;import org.apache.commons.httpclient.util.ExceptionUtil;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;/** * An abstract base implementation of HttpMethod. * <p> * At minimum, subclasses will need to override: * <ul> *   <li>{@link #getName} to return the approriate name for this method *   </li> * </ul> * </p> * * <p> * When a method requires additional request headers, subclasses will typically * want to override: * <ul> *   <li>{@link #addRequestHeaders addRequestHeaders(HttpState,HttpConnection)} *      to write those headers *   </li> * </ul> * </p> * * <p> * When a method expects specific response headers, subclasses may want to * override: * <ul> *   <li>{@link #processResponseHeaders processResponseHeaders(HttpState,HttpConnection)} *     to handle those headers *   </li> * </ul> * </p> * * * @author <a href="mailto:remm@apache.org">Remy Maucherat</a> * @author Rodney Waldhoff * @author Sean C. Sullivan * @author <a href="mailto:dion@apache.org">dIon Gillard</a> * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a> * @author <a href="mailto:dims@apache.org">Davanum Srinivas</a> * @author Ortwin Glueck * @author Eric Johnson * @author Michael Becke * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a> * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a> * @author Christian Kohlschuetter * * @version $Revision: 1.10 $ $Date: 2005/08/12 23:42:58 $ */public abstract class HttpMethodBase implements HttpMethod {    // -------------------------------------------------------------- Constants    /** Log object for this class. */    private static final Log LOG = LogFactory.getLog(HttpMethodBase.class);    // ----------------------------------------------------- Instance variables     /** Request headers, if any. */    private HeaderGroup requestHeaders = new HeaderGroup();    /** The Status-Line from the response. */    private StatusLine statusLine = null;    /** Response headers, if any. */    private HeaderGroup responseHeaders = new HeaderGroup();    /** Response trailer headers, if any. */    private HeaderGroup responseTrailerHeaders = new HeaderGroup();    /** Path of the HTTP method. */    private String path = null;    /** Query string of the HTTP method, if any. */    private String queryString = null;    /** The response body of the HTTP method, assuming it has not be      * intercepted by a sub-class. */    private InputStream responseStream = null;    /** The connection that the response stream was read from. */    private HttpConnection responseConnection = null;    /** Buffer for the response */    private byte[] responseBody = null;    /** True if the HTTP method should automatically follow HTTP redirects.*/    private boolean followRedirects = false;    /** True if the HTTP method should automatically handle    *  HTTP authentication challenges. */    private boolean doAuthentication = true;    /** HTTP protocol parameters. */    private HttpMethodParams params = new HttpMethodParams();    /** Host authentication state */    private AuthState hostAuthState = new AuthState();    /** Proxy authentication state */    private AuthState proxyAuthState = new AuthState();    /** True if this method has already been executed. */    private boolean used = false;    /** Count of how many times did this HTTP method transparently handle     * a recoverable exception. */    private int recoverableExceptionCount = 0;    /** the host for this HTTP method, can be null */    private HttpHost httphost = null;    /**     * Handles method retries     *      * @deprecated no loner used     */    private MethodRetryHandler methodRetryHandler;    /** True if the connection must be closed when no longer needed */    private boolean connectionCloseForced = false;    /** Number of milliseconds to wait for 100-contunue response. */    private static final int RESPONSE_WAIT_TIME_MS = 3000;    /** HTTP protocol version used for execution of this method. */    private HttpVersion effectiveVersion = null;    /** Whether the execution of this method has been aborted */    private transient boolean aborted = false;    /** Whether the HTTP request has been transmitted to the target     * server it its entirety */    private boolean requestSent = false;        /** Actual cookie policy */    private CookieSpec cookiespec = null;    /** Default initial size of the response buffer if content length is unknown. */    private static final int DEFAULT_INITIAL_BUFFER_SIZE = 4*1024; // 4 kB        // ----------------------------------------------------------- Constructors    /**     * No-arg constructor.     */    public HttpMethodBase() {    }    /**     * Constructor specifying a URI.     * It is responsibility of the caller to ensure that URI elements     * (path & query parameters) are properly encoded (URL safe).     *     * @param uri either an absolute or relative URI. The URI is expected     *            to be URL-encoded     *      * @throws IllegalArgumentException when URI is invalid     * @throws IllegalStateException when protocol of the absolute URI is not recognised     */    public HttpMethodBase(String uri)         throws IllegalArgumentException, IllegalStateException {        try {            // create a URI and allow for null/empty uri values            if (uri == null || uri.equals("")) {                uri = "/";            }// BEGIN IA CHANGES//        setURI(new URI(uri, true));          setURI(new org.archive.net.LaxURI(uri, true));// END IA CHANGES        } catch (URIException e) {            throw new IllegalArgumentException("Invalid uri '"                 + uri + "': " + e.getMessage()             );        }    }    // ------------------------------------------- Property Setters and Getters    /**     * Obtains the name of the HTTP method as used in the HTTP request line,     * for example <tt>"GET"</tt> or <tt>"POST"</tt>.     *      * @return the name of this method     */    public abstract String getName();    /**     * Returns the URI of the HTTP method     *      * @return The URI     *      * @throws URIException If the URI cannot be created.     *      * @see org.apache.commons.httpclient.HttpMethod#getURI()     */    public URI getURI() throws URIException {        StringBuffer buffer = new StringBuffer();        if (this.httphost != null) {            buffer.append(this.httphost.getProtocol().getScheme());            buffer.append("://");            buffer.append(this.httphost.getHostName());            int port = this.httphost.getPort();            if (port != -1 && port != this.httphost.getProtocol().getDefaultPort()) {                buffer.append(":");                buffer.append(port);            }        }        buffer.append(this.path);        if (this.queryString != null) {            buffer.append('?');            buffer.append(this.queryString);        }        return new URI(buffer.toString(), true);    }    /**     * Sets the URI for this method.      *      * @param uri URI to be set      *      * @throws URIException if a URI cannot be set     *      * @since 3.0     */    public void setURI(URI uri) throws URIException {        // only set the host if specified by the URI        if (uri.isAbsoluteURI()) {            this.httphost = new HttpHost(uri);        }        // set the path, defaulting to root        setPath(            uri.getPath() == null            ? "/"            : uri.getEscapedPath()        );        setQueryString(uri.getEscapedQuery());    }     /**     * Sets whether or not the HTTP method should automatically follow HTTP redirects      * (status code 302, etc.)     *      * @param followRedirects <tt>true</tt> if the method will automatically follow redirects,     * <tt>false</tt> otherwise.     */    public void setFollowRedirects(boolean followRedirects) {        this.followRedirects = followRedirects;    }    /**     * Returns <tt>true</tt> if the HTTP method should automatically follow HTTP redirects      * (status code 302, etc.), <tt>false</tt> otherwise.     *      * @return <tt>true</tt> if the method will automatically follow HTTP redirects,      * <tt>false</tt> otherwise.     */    public boolean getFollowRedirects() {        return this.followRedirects;    }    /** Sets whether version 1.1 of the HTTP protocol should be used per default.     *     * @param http11 <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0     *      * @deprecated Use {@link HttpMethodParams#setVersion(HttpVersion)}     */    public void setHttp11(boolean http11) {        if (http11) {            this.params.setVersion(HttpVersion.HTTP_1_1);        } else {            this.params.setVersion(HttpVersion.HTTP_1_0);        }     }    /**     * Returns <tt>true</tt> if the HTTP method should automatically handle HTTP      * authentication challenges (status code 401, etc.), <tt>false</tt> otherwise     *     * @return <tt>true</tt> if authentication challenges will be processed      * automatically, <tt>false</tt> otherwise.     *      * @since 2.0     */    public boolean getDoAuthentication() {        return doAuthentication;    }    /**     * Sets whether or not the HTTP method should automatically handle HTTP      * authentication challenges (status code 401, etc.)     *     * @param doAuthentication <tt>true</tt> to process authentication challenges     * authomatically, <tt>false</tt> otherwise.     *      * @since 2.0     */    public void setDoAuthentication(boolean doAuthentication) {        this.doAuthentication = doAuthentication;    }    // ---------------------------------------------- Protected Utility Methods    /**     * Returns <tt>true</tt> if version 1.1 of the HTTP protocol should be      * used per default, <tt>false</tt> if version 1.0 should be used.     *

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丝袜亚洲另类欧美综合| 成人av在线播放网址| 国产99久久久国产精品免费看| 色婷婷久久久综合中文字幕 | 日本欧美韩国一区三区| 国产成人综合网站| 6080午夜不卡| 亚洲综合网站在线观看| 国产69精品久久久久777| 91麻豆精品91久久久久久清纯| 国产精品第五页| 国产麻豆成人传媒免费观看| 欧美喷潮久久久xxxxx| 亚洲欧美在线视频观看| 国产精品影视网| 欧美成人免费网站| 日韩电影在线观看网站| 欧美午夜视频网站| 亚洲精品老司机| 成人综合婷婷国产精品久久免费| 欧美精三区欧美精三区| 91精品免费在线观看| 亚洲一区在线观看免费观看电影高清| 国产成人综合在线播放| 欧美日本免费一区二区三区| 一区二区三区在线不卡| 91视频精品在这里| 亚洲卡通动漫在线| 91免费版在线| 亚洲在线免费播放| 欧美三级在线播放| 石原莉奈在线亚洲三区| 欧美日韩国产精选| 国产成人在线电影| 欧美国产精品久久| 成人美女视频在线观看18| 欧美国产日韩a欧美在线观看| 激情偷乱视频一区二区三区| 精品免费99久久| 国产一区二区中文字幕| 久久综合久久综合久久综合| 国产精品亚洲第一区在线暖暖韩国| 亚洲精品一区二区三区福利| 国产麻豆成人精品| 亚洲欧洲日韩在线| 91久久精品一区二区| 亚洲成人综合在线| 日韩一区二区在线观看| 国产毛片精品视频| 中文字幕一区二区三区精华液| 91在线丨porny丨国产| 亚洲国产日韩综合久久精品| 91精品欧美一区二区三区综合在 | 精品视频免费在线| 日本不卡中文字幕| 久久久美女毛片| 一本色道久久综合亚洲aⅴ蜜桃| 一区二区三区欧美| 欧美sm美女调教| aaa亚洲精品| 秋霞影院一区二区| 国产女同性恋一区二区| 欧美最猛黑人xxxxx猛交| 日av在线不卡| 国产精品久久久久久久久久久免费看| 久久亚洲精品国产精品紫薇| 成人av电影在线网| 午夜精品久久久| 久久久久久久一区| 欧美性一级生活| 国产酒店精品激情| 亚洲电影激情视频网站| 久久久国产一区二区三区四区小说| 99精品黄色片免费大全| 日韩极品在线观看| 亚洲丝袜自拍清纯另类| 欧美sm美女调教| 欧洲另类一二三四区| 国产精品一区二区不卡| 午夜天堂影视香蕉久久| 国产精品人人做人人爽人人添 | 337p日本欧洲亚洲大胆色噜噜| 99精品视频一区| 精品一区二区在线看| 亚洲综合一区二区三区| 欧美国产日韩a欧美在线观看| 久久一日本道色综合| 日韩欧美不卡一区| 91麻豆精品一区二区三区| 日本不卡视频一二三区| 亚洲人成亚洲人成在线观看图片| 制服丝袜成人动漫| 在线视频一区二区三区| 国产不卡视频一区二区三区| 青椒成人免费视频| 亚洲在线视频免费观看| 国产精品久久久久久妇女6080| 91精品国产美女浴室洗澡无遮挡| 不卡的电视剧免费网站有什么| 日韩精品久久理论片| 亚洲午夜视频在线观看| 中文字幕一区二区三区在线播放| 26uuuu精品一区二区| 5858s免费视频成人| 欧美日韩一卡二卡三卡| 日本韩国一区二区| 91亚洲午夜精品久久久久久| 成人在线视频一区| 高清成人免费视频| 福利一区在线观看| 国产风韵犹存在线视精品| 国产在线观看一区二区| 免费成人结看片| 激情综合网激情| 国产精品一线二线三线| 国产精品自拍一区| 国产a视频精品免费观看| 国精品**一区二区三区在线蜜桃| 久久av老司机精品网站导航| 久久精品国产色蜜蜜麻豆| 久久99精品国产麻豆不卡| 蜜桃一区二区三区在线观看| 麻豆久久一区二区| 国产一区二区三区av电影| 国产一区二区三区在线观看免费| 狠狠网亚洲精品| 成人综合在线观看| 色综合天天综合网天天狠天天| 色国产综合视频| 欧美日本韩国一区| 欧美精品一区二区三区视频| 久久久精品人体av艺术| 中文字幕一区二区三区乱码在线| 亚洲欧美偷拍三级| 午夜精品在线看| 久久99国产精品免费网站| 成人丝袜高跟foot| 欧美三区在线视频| 日韩欧美在线网站| 国产精品每日更新| 性久久久久久久久久久久| 久久成人麻豆午夜电影| 丁香啪啪综合成人亚洲小说 | 暴力调教一区二区三区| 在线观看91精品国产入口| 日韩一级黄色片| 国产精品视频你懂的| 亚洲高清免费观看| 国产精品456| 欧美日韩一区小说| 久久免费偷拍视频| 亚洲伊人色欲综合网| 精品一区二区三区影院在线午夜 | www.久久久久久久久| 欧美午夜视频网站| 国产免费观看久久| 午夜激情综合网| 成人黄色在线看| 日韩一级二级三级| 亚洲欧美国产毛片在线| 日本免费新一区视频| 色偷偷88欧美精品久久久| 欧美www视频| 亚洲福利一区二区三区| 国产成人一级电影| 日韩美女一区二区三区四区| 亚洲视频一区在线| 国产一区二区调教| 欧美人妖巨大在线| ●精品国产综合乱码久久久久| 久久er99热精品一区二区| 欧美在线|欧美| 国产精品免费av| 国产一区在线精品| 欧美精品777| 亚洲一区二区三区三| 99久久综合狠狠综合久久| 欧美v亚洲v综合ⅴ国产v| 偷拍自拍另类欧美| 色综合久久六月婷婷中文字幕| 国产午夜精品美女毛片视频| 奇米888四色在线精品| 欧美综合一区二区三区| 综合婷婷亚洲小说| 成人午夜在线播放| 久久久91精品国产一区二区精品| 蜜臀久久99精品久久久久宅男| 在线免费不卡视频| 亚洲人成网站影音先锋播放| 丁香婷婷深情五月亚洲| 久久欧美一区二区| 精品一区二区三区香蕉蜜桃| 日韩一区二区三区免费看| 日韩av一二三| 7777精品伊人久久久大香线蕉| 无码av中文一区二区三区桃花岛| 在线免费观看日韩欧美| 亚洲国产一区在线观看| 欧美日韩亚洲另类| 免费美女久久99|