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

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

?? httpmethodbase.java

?? 爬蟲
?? 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一区二区三区免费野_久草精品视频
国产女人18毛片水真多成人如厕| 一本到不卡免费一区二区| 91精品一区二区三区在线观看| 亚洲国产成人av好男人在线观看| 欧美精选一区二区| 日本一区中文字幕| 2021久久国产精品不只是精品| 国产一区二区美女诱惑| 亚洲国产精品精华液ab| 91美女片黄在线观看91美女| 亚洲国产精品人人做人人爽| 91精品婷婷国产综合久久| 国内外成人在线视频| 中文字幕在线免费不卡| 欧美少妇bbb| 六月丁香综合在线视频| 欧美韩国一区二区| 色呦呦国产精品| 麻豆免费精品视频| 中文字幕一区三区| 欧美日韩国产一二三| 国产一区二区在线影院| 亚洲日本一区二区| 欧美刺激脚交jootjob| 成人白浆超碰人人人人| 五月婷婷综合网| 国产日韩三级在线| 欧美日韩午夜在线视频| 国产精品白丝av| 亚洲福利视频一区| 亚洲国产成人在线| 欧美久久久久久久久中文字幕| 国产成人精品三级| 日韩va亚洲va欧美va久久| 国产日本亚洲高清| 欧美高清激情brazzers| 成人黄色国产精品网站大全在线免费观看 | 亚洲综合久久av| 久久婷婷色综合| 欧美午夜宅男影院| 成人免费看片app下载| 日韩1区2区3区| 亚洲乱码国产乱码精品精小说| 精品对白一区国产伦| 欧美色综合天天久久综合精品| 处破女av一区二区| 美女在线视频一区| 亚洲成人在线观看视频| 国产精品激情偷乱一区二区∴| 色欧美88888久久久久久影院| 久久网站最新地址| 99精品黄色片免费大全| 亚洲国产一区在线观看| 欧美成人在线直播| 欧美日韩一区国产| 92精品国产成人观看免费| 国产美女主播视频一区| 午夜欧美视频在线观看| 亚洲激情六月丁香| 国产精品嫩草影院av蜜臀| 精品国产免费人成在线观看| 欧美疯狂做受xxxx富婆| 色婷婷久久99综合精品jk白丝| 国产91精品精华液一区二区三区 | 91精品视频网| 欧美三级在线视频| 色综合久久久久久久久| 91麻豆国产在线观看| av在线这里只有精品| 国产ts人妖一区二区| 国产在线观看一区二区| 韩国女主播成人在线观看| 免费成人美女在线观看.| 97精品超碰一区二区三区| 日韩精品亚洲一区| 亚洲福中文字幕伊人影院| 亚洲久本草在线中文字幕| 中文字幕精品综合| 国产欧美日韩麻豆91| 国产欧美一区二区精品秋霞影院| 欧美一区二区日韩| 精品女同一区二区| 欧美精品一区二区三区蜜臀| 欧美精品一区二区三区高清aⅴ| 精品国产乱码久久久久久老虎| 日韩免费看的电影| 久久久精品免费观看| 日本一区二区综合亚洲| 国产精品灌醉下药二区| 亚洲视频一二区| 一区二区高清免费观看影视大全| 一区二区三区欧美| 天堂一区二区在线| 精品一区二区三区在线视频| 国产一区日韩二区欧美三区| 丰满亚洲少妇av| 一本色道久久综合亚洲精品按摩| 色88888久久久久久影院野外 | 欧美色图12p| 91麻豆精品国产无毒不卡在线观看| 日韩欧美综合一区| 国产亚洲一二三区| 亚洲精品国产精品乱码不99| 亚洲成年人影院| 韩国毛片一区二区三区| 91亚洲精品久久久蜜桃网站| 欧美日韩一区国产| 久久色在线视频| 亚洲美女视频在线| 免费在线看一区| 99国产精品久久久久久久久久 | 欧美理论在线播放| 2021中文字幕一区亚洲| 亚洲欧洲成人精品av97| 性做久久久久久久久| 国产做a爰片久久毛片| 91麻豆免费在线观看| 日韩一区二区电影| 中文字幕日韩av资源站| 日韩高清不卡一区二区三区| 粉嫩久久99精品久久久久久夜| 91免费国产在线| 欧美精品一区二区三区蜜臀 | 欧美午夜精品一区二区三区| 精品久久久久久久久久久院品网 | 国产精品1区二区.| 欧美亚洲动漫精品| 久久久久99精品国产片| 亚洲国产欧美在线| 国产99久久久精品| 91精品久久久久久久久99蜜臂| 国产精品免费视频观看| 久久精品国产在热久久| 色婷婷av一区二区三区之一色屋| 2022国产精品视频| 亚洲1区2区3区视频| av午夜精品一区二区三区| 欧美一级高清大全免费观看| 亚洲欧美另类久久久精品2019 | 国产成人av一区二区三区在线观看| 欧美图区在线视频| 1000部国产精品成人观看| 久国产精品韩国三级视频| 欧美视频一区二区三区四区| 国产精品乱人伦一区二区| 精品制服美女丁香| 4438x成人网最大色成网站| 亚洲人成影院在线观看| 国产伦精品一区二区三区免费迷| 88在线观看91蜜桃国自产| 亚洲精品少妇30p| 91亚洲资源网| 综合av第一页| 91亚洲男人天堂| 国产精品国产三级国产| 丁香亚洲综合激情啪啪综合| 精品久久一区二区三区| 日本欧美在线看| 91精品啪在线观看国产60岁| 亚洲妇女屁股眼交7| 在线免费观看日本欧美| 亚洲视频 欧洲视频| 91蜜桃婷婷狠狠久久综合9色| 国产精品网曝门| 成人18视频在线播放| 欧美国产激情一区二区三区蜜月| 国产精品伊人色| 国产午夜精品理论片a级大结局 | 日韩影院免费视频| 欧美日韩日日摸| 午夜精品久久久久久| 欧美群妇大交群的观看方式| 舔着乳尖日韩一区| 91超碰这里只有精品国产| 日本不卡123| 日韩精品一区二区三区视频播放| 精品中文字幕一区二区小辣椒 | 国产拍揄自揄精品视频麻豆 | 99精品久久只有精品| √…a在线天堂一区| 一本到高清视频免费精品| 一区二区高清免费观看影视大全| 欧美写真视频网站| 日韩一区精品字幕| 欧美精品一区二区久久久| 国产精品一区二区三区99| 国产精品久久久久久久裸模| 93久久精品日日躁夜夜躁欧美| 一区二区三区精品在线| 欧美日韩性生活| 国产在线精品一区二区夜色| 国产午夜一区二区三区| 91免费视频观看| 三级久久三级久久| 久久精品视频网| 色悠久久久久综合欧美99| 日韩成人免费电影| 国产欧美视频在线观看| 91黄色免费观看| 精一区二区三区|