diff --git a/modules/ANSUtilities/ANSAWSS3.cpp b/modules/ANSUtilities/ANSAWSS3.cpp index 93566b4..d9791ea 100644 --- a/modules/ANSUtilities/ANSAWSS3.cpp +++ b/modules/ANSUtilities/ANSAWSS3.cpp @@ -628,10 +628,6 @@ namespace ANSCENTER // Auto-prewarm the connection pool so the first N concurrent uploads // don't serialize on TLS handshake. No-op if not connected yet. - // Callers wanting a different size can call PrewarmConnectionPool() - // directly at any time — this is just a sensible default that keeps - // existing LabVIEW callers (which only invoke SetAuthentication via - // the C wrapper) warm without any API change on their side. static constexpr int kDefaultPrewarmCount = 8; PrewarmConnectionPool(kDefaultPrewarmCount); @@ -1566,14 +1562,6 @@ namespace ANSCENTER conn->rest.put_Host(_fullAWSURL.c_str()); } - // Fix 1: the CkRest inside a pooled S3Connection accumulates - // headers and query params across requests. Clear them at the - // start of every attempt so a request can't inherit stale - // state (e.g. Content-Encoding:gzip) from a prior upload on - // this same connection. - conn->rest.ClearAllHeaders(); - conn->rest.ClearAllQueryParams(); - // Read the file on each attempt (cheap; keeps the body fresh). CkFileAccess fac; const char* fileContents = fac.readEntireTextFile(textFilePath.c_str(), "utf-8"); @@ -1665,14 +1653,6 @@ namespace ANSCENTER conn->rest.put_Host(_fullAWSURL.c_str()); } - // Fix 1: the CkRest inside a pooled S3Connection accumulates - // headers and query params across requests. Clear them at the - // start of every attempt so a request can't inherit stale - // state (e.g. Content-Encoding:gzip) from a prior upload on - // this same connection. - conn->rest.ClearAllHeaders(); - conn->rest.ClearAllQueryParams(); - CkBinData binData; if (!binData.LoadFile(dataFilePath.c_str())) { lastError = std::string("Failed to load file: ") + binData.lastErrorText(); @@ -1775,14 +1755,6 @@ namespace ANSCENTER conn->rest.put_Host(_fullAWSURL.c_str()); } - // Fix 1: the CkRest inside a pooled S3Connection accumulates - // headers and query params across requests. Clear them at the - // start of every attempt so a request can't inherit stale - // state (e.g. Content-Encoding:gzip) from a prior upload on - // this same connection. - conn->rest.ClearAllHeaders(); - conn->rest.ClearAllQueryParams(); - CkBinData binData; if (!binData.LoadFile(dataFilePath.c_str())) { lastError = std::string("Failed to load file: ") + binData.lastErrorText(); @@ -1858,14 +1830,6 @@ namespace ANSCENTER conn->rest.put_Host(_fullAWSURL.c_str()); } - // Fix 1: the CkRest inside a pooled S3Connection accumulates - // headers and query params across requests. Clear them at the - // start of every attempt so a request can't inherit stale - // state (e.g. Content-Encoding:gzip) from a prior upload on - // this same connection. - conn->rest.ClearAllHeaders(); - conn->rest.ClearAllQueryParams(); - // Fresh stream per attempt (it holds OS file handle state). CkStream fileStream; fileStream.put_SourceFile(dataFilePath.c_str()); @@ -1979,14 +1943,6 @@ namespace ANSCENTER conn->rest.put_Host(_fullAWSURL.c_str()); } - // Fix 1: the CkRest inside a pooled S3Connection accumulates - // headers and query params across requests. Clear them at the - // start of every attempt so a request can't inherit stale - // state (e.g. Content-Encoding:gzip) from a prior upload on - // this same connection. - conn->rest.ClearAllHeaders(); - conn->rest.ClearAllQueryParams(); - // ---- STEP 1: INITIATE ---- conn->rest.ClearAllQueryParams(); conn->rest.AddQueryParam("uploads", ""); @@ -2203,14 +2159,6 @@ namespace ANSCENTER conn->rest.put_Host(_fullAWSURL.c_str()); } - // Fix 1: the CkRest inside a pooled S3Connection accumulates - // headers and query params across requests. Clear them at the - // start of every attempt so a request can't inherit stale - // state (e.g. Content-Encoding:gzip) from a prior upload on - // this same connection. - conn->rest.ClearAllHeaders(); - conn->rest.ClearAllQueryParams(); - // ---- STEP 1: INITIATE ---- conn->rest.ClearAllQueryParams(); conn->rest.AddQueryParam("uploads", ""); @@ -2370,14 +2318,6 @@ namespace ANSCENTER conn->rest.put_Host(_fullAWSURL.c_str()); } - // Fix 1: the CkRest inside a pooled S3Connection accumulates - // headers and query params across requests. Clear them at the - // start of every attempt so a request can't inherit stale - // state (e.g. Content-Encoding:gzip) from a prior upload on - // this same connection. - conn->rest.ClearAllHeaders(); - conn->rest.ClearAllQueryParams(); - CkBinData binData; CkByteData jpegBytes; jpegBytes.append2(jpeg_string, static_cast(bufferLength)); @@ -2466,14 +2406,6 @@ namespace ANSCENTER conn->rest.put_Host(_fullAWSURL.c_str()); } - // Fix 1: the CkRest inside a pooled S3Connection accumulates - // headers and query params across requests. Clear them at the - // start of every attempt so a request can't inherit stale - // state (e.g. Content-Encoding:gzip) from a prior upload on - // this same connection. - conn->rest.ClearAllHeaders(); - conn->rest.ClearAllQueryParams(); - CkBinData binData; CkByteData jpegBytes; jpegBytes.append2(jpeg_string, static_cast(bufferLength));