Exemple #1
0
        public HttpMessage(ProxySettings settings)
        {
            this.settings = settings;

            this.Request  = new HttpRequestInfo();
            this.Response = new HttpResponseInfo();

            this.requestHeaderBuffer  = new HeaderSearchBuffer(HeaderSearchBufferType.Request);
            this.responseHeaderBuffer = new HeaderSearchBuffer(HeaderSearchBufferType.Response);

            if (settings.InspectorFactory != null)
            {
                this.messageInspector = settings.InspectorFactory.CreateHttpMessageInspector(this);
            }
        }
Exemple #2
0
        public HttpMessage(ProxySettings settings)
        {
            this.settings = settings;

            this.Request = new HttpRequestInfo();
            this.Response = new HttpResponseInfo();

            this.requestHeaderBuffer = new HeaderSearchBuffer(HeaderSearchBufferType.Request);
            this.responseHeaderBuffer = new HeaderSearchBuffer(HeaderSearchBufferType.Response);

            if (settings.InspectorFactory != null)
            {
                this.messageInspector = settings.InspectorFactory.CreateHttpMessageInspector(this);
            }
        }
Exemple #3
0
        private void CheckOnFinalChunk()
        {
            if (this.contentBuffer[3] == chunkSizeDelimiter[0])
            {
                // no trailer
                this.FinishedLoading = true;
                this.ContentOffset   = this.contentLoadedSize - FinalChunkLength;
            }
            else
            {
                this.headerSearchBuffer = new HeaderSearchBuffer(HeaderSearchBufferType.Response);
                this.loadingTrailer     = true;

                int    offsetStart = FinalChunkLength - 2;
                byte[] offsetData  = Utils.CopyArray(this.contentBuffer, offsetStart, this.contentBufferSize - offsetStart);
                this.LoadTrailer(offsetData);
            }
        }