Exemplo n.º 1
0
            private HttpParserConfig CreateConfig(HttpRequestHeader header)
            {
                HttpParserConfig config = new HttpParserConfig();

                HttpLayerConfigEntry entry = _layer._config.GetEntry(header);

                config.StreamBody      = entry.RequestStreamBody;
                config.StreamChunkSize = _layer._config.RequestStreamChunkSize;
                config.StrictParsing   = _layer._config.RequestStrictParsing;

                if (_layer._config.BufferedRequestMaxLength != 0 && (header.ContentLength > _layer._config.BufferedRequestMaxLength))
                {
                    config.StreamBody = true;
                }

                return(config);
            }
Exemplo n.º 2
0
            private HttpParserConfig CreateConfig(HttpResponseHeader response, HttpRequestHeader request)
            {
                HttpParserConfig config = new HttpParserConfig();

                HttpLayerConfigEntry entry = _layer._config.GetEntry(request, response);

                config.ConvertToChunked = entry.ConvertToChunked;
                config.StreamBody       = entry.ResponseStreamBody;
                config.StreamChunkSize  = _layer._config.ResponseStreamChunkSize;
                config.StrictParsing    = _layer._config.ResponseStrictParsing;

                if (_layer._config.BufferedResponseMaxLength != 0 && (response.ContentLength > _layer._config.BufferedResponseMaxLength))
                {
                    config.StreamBody = true;
                }

                return(config);
            }
Exemplo n.º 3
0
 /// <summary>
 /// Constructor
 /// </summary>
 public HttpNetworkLayerConfig()
 {
     ConfigEntries = new HttpLayerConfigEntry[0];
     DefaultEntry = new HttpLayerConfigEntry();
 }
Exemplo n.º 4
0
 /// <summary>
 /// Constructor
 /// </summary>
 public HttpNetworkLayerConfig()
 {
     ConfigEntries = new HttpLayerConfigEntry[0];
     DefaultEntry  = new HttpLayerConfigEntry();
 }