You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Create a collection of supplied parameters: query variables in the URL string for HTTP GET requests and form parameters from the request body for HTTP PUT requests.
longtimeToCompressResponse=sw.ElapsedMilliseconds-lastTime;lastTime=sw.ElapsedMilliseconds;// Record the duration
4947
4947
4948
-
requestData.Response.SendChunked=true;
4948
+
// Set chunked transfer mode if the requested protocol is HTTP/1.1 or later
4949
+
try
4950
+
{
4951
+
if(requestData.Response.ProtocolVersion.CompareTo(newVersion(1,1))>=0)// Protocol is HTTP/1.1 or later
4952
+
{
4953
+
LogMessage1(requestData,requestData.Elements[URL_ELEMENT_METHOD],$"### Protocol is HTTP/1.1 or later - Setting response.SendChuncked = true");
4954
+
requestData.Response.SendChunked=true;
4955
+
}
4956
+
else// Protocol is HTTP/1.0
4957
+
{
4958
+
LogMessage1(requestData,requestData.Elements[URL_ELEMENT_METHOD],$"### Protocol is HTTP/1.0 - NOT setting chuncked transfer mode");
4959
+
}
4960
+
}
4961
+
catch(Exceptionex)
4962
+
{
4963
+
// Something went wrong when evaluating the HTTP protocol version or when setting chunked transfer mode. This is not considered fatal here because
4964
+
// we are able to use the request object "as-is" without changing it. If there is a significant issue, the request will fail later in the process and will be dealt with then.
4965
+
LogException1(requestData,requestData.Elements[URL_ELEMENT_METHOD],$"Exception while evaluating HTTP protocol version or setting chunked mode\r\n{ex}");
4966
+
}
4967
+
4949
4968
requestData.Response.AddHeader(SharedConstants.BASE64_HANDOFF_HEADER,SharedConstants.BASE64_HANDOFF_SUPPORTED);// Add a header indicating that the content is base64 serialised
4950
4969
requestData.Response.ContentType="image/tiff";// Must use image/tiff to ensure fast data transmission. All other content types are slower e.g. text/plain takes 8 seconds while image/tiff takes 1 second.
0 commit comments