示例#1
0
        internal HttpProxyTunnelRequest(Uri proxyUri, Uri requestUri) : base(proxyUri) {

            GlobalLog.Enter("HttpProxyTunnelRequest::HttpProxyTunnelRequest",
                            "proxyUri="+proxyUri+", requestUri="+requestUri
                            );

            Method = "CONNECT";

            //
            // CONNECT requests cannot be pipelined
            //

            Pipelined = false;
            m_originServer = requestUri;

            //
            // each CONNECT request has a unique connection group name to avoid
            // non-CONNECT requests being made over the same connection
            //

            ConnectionGroupName = ServicePointManager.SpecialConnectGroupName + "(" + UniqueGroupId + ")";

            //
            // the CONNECT request must respond to a 407 as if it were a 401.
            // So we set up the server authentication state as if for a proxy
            //
            ServerAuthenticationState = new AuthenticationState(true);

            GlobalLog.Leave("HttpProxyTunnelRequest::HttpProxyTunnelRequest");
        }
示例#2
0
        internal HttpWebRequest(Uri proxyUri, Uri requestUri, HttpWebRequest orginalRequest) : this(proxyUri, null) {

            GlobalLog.Enter("HttpWebRequest::HttpWebRequest",
                            "proxyUri="+proxyUri+", requestUri="+requestUri
                            );

            _OriginVerb = KnownHttpVerb.Parse("CONNECT");

            //
            // CONNECT requests cannot be pipelined
            //

            Pipelined = false;

            //
            // each CONNECT request has a unique connection group name to avoid
            // non-CONNECT requests being made over the same connection
            //

            _OriginUri = requestUri;

            IsTunnelRequest = true;

            _ConnectionGroupName = ServicePointManager.SpecialConnectGroupName + "(" + UniqueGroupId + ")";
            m_InternalConnectionGroup = true;

            //
            // the CONNECT request must respond to a 407 as if it were a 401.
            // So we set up the server authentication state as if for a proxy
            //
            ServerAuthenticationState = new AuthenticationState(true);

            // CONNECT request is not suitable for caching
            CacheProtocol = null;

            m_ContinueTimeout = DefaultContinueTimeout;
            m_ContinueTimerQueue = s_ContinueTimerQueue;

            GlobalLog.Leave("HttpWebRequest::HttpWebRequest");
        }
示例#3
0
        private void CreateDefaultObjects() {
            _Uri                        = _OriginUri;
            _ProxyAuthenticationState = new AuthenticationState(true);
            _ServerAuthenticationState = new AuthenticationState(false);

        }