Skip to content
Snippets Groups Projects
Commit 3057d246 authored by Monty Brandenberg's avatar Monty Brandenberg
Browse files

Documentation. Describe curl bug 1420 testing and how to

reproduce data corruption via timeouts.
parent bd0a9b6b
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,19 @@ ...@@ -47,6 +47,19 @@
#include "llhttpconstants.h" #include "llhttpconstants.h"
#include "llproxy.h" #include "llproxy.h"
// *DEBUG: "[curl:bugs] #1420" problem and testing.
//
// A pipelining problem, https://sourceforge.net/p/curl/bugs/1420/,
// was a source of Core_9 failures. Code related to this can be
// identified and tested by:
// * Looking for '[curl:bugs]' strings in source and following
// instructions there.
// * Set 'QAModeHttpTrace' to 2 or 3 in settings.xml and look for
// 'timed out' events in the log.
// * Enable the HttpRangeRequestsDisable debug setting which causes
// full asset fetches. These slow the pipelines down a bit.
//
namespace namespace
{ {
...@@ -610,6 +623,8 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service) ...@@ -610,6 +623,8 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
// *TODO: Find a better scheme than timeouts to guarantee liveness. // *TODO: Find a better scheme than timeouts to guarantee liveness.
xfer_timeout *= cpolicy.mPipelining; xfer_timeout *= cpolicy.mPipelining;
} }
// *DEBUG: Useful for timeout handling and "[curl:bugs] #1420" tests
// xfer_timeout = 3L;
code = curl_easy_setopt(mCurlHandle, CURLOPT_TIMEOUT, xfer_timeout); code = curl_easy_setopt(mCurlHandle, CURLOPT_TIMEOUT, xfer_timeout);
check_curl_easy_code(code, CURLOPT_TIMEOUT); check_curl_easy_code(code, CURLOPT_TIMEOUT);
code = curl_easy_setopt(mCurlHandle, CURLOPT_CONNECTTIMEOUT, timeout); code = curl_easy_setopt(mCurlHandle, CURLOPT_CONNECTTIMEOUT, timeout);
......
...@@ -240,6 +240,10 @@ bool HttpStatus::isRetryable() const ...@@ -240,6 +240,10 @@ bool HttpStatus::isRetryable() const
static const HttpStatus inv_cont_range(HttpStatus::LLCORE, HE_INV_CONTENT_RANGE_HDR); static const HttpStatus inv_cont_range(HttpStatus::LLCORE, HE_INV_CONTENT_RANGE_HDR);
static const HttpStatus inv_status(HttpStatus::LLCORE, HE_INVALID_HTTP_STATUS); static const HttpStatus inv_status(HttpStatus::LLCORE, HE_INVALID_HTTP_STATUS);
// *DEBUG: For "[curl:bugs] #1420" tests.
// Disable the '*this == inv_status' test and look for 'Core_9'
// failures in log files.
return ((isHttpStatus() && mType >= 499 && mType <= 599) || // Include special 499 in retryables return ((isHttpStatus() && mType >= 499 && mType <= 599) || // Include special 499 in retryables
*this == cant_connect || // Connection reset/endpoint problems *this == cant_connect || // Connection reset/endpoint problems
*this == cant_res_proxy || // DNS problems *this == cant_res_proxy || // DNS problems
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment