This reverts commit 7f0723149c.
Seeing some of our (Google's) tests fail because of the change in flow, holding
off on this change until the change in behavior can be better
documented/understood. This might end up needing to be a breaking change if the
behavior difference on tests is enough.
* Support testBlock on restarted upload fetchers without querying network (#185)
* Scope restarted upload setup to test blocks (#185)
* Document restarted upload request synthesis for testBlock (#185)
* Add option to disable JSON reformatting in debug logs (#101)
When logging JSON payloads, GTM re-serializes the payload with pretty-printing,
which can modify float representations (e.g. 2.06 -> 2.0600000000000001) and
obscure wire-level formatting.
This change adds `setReformatLoggedJSONEnabled:` / `isReformatLoggedJSONEnabled`
(defaulting to YES). When disabled:
- The raw payload is logged without reformatting, preserving exact number
representations and whitespace.
- If the payload contains sensitive OAuth tokens (`access_token` or `refresh_token`),
the entire payload in the log is redacted (`_snip_`) to avoid token leakage
without falling back to re-serialization.
Fixes#101
* Strengthen JSON formatting regression tests (#101)
Ensure that responseHeaders and statusCode are consistently available to clients when an upload completes outside of a standard chunk upload (e.g., when it is interrupted but completes on the server, or when the fetcher is instantiated with an already completed URL).
Previously, if a final chunk upload was interrupted, a subsequent query request would retrieve the final response but fail to expose the final response headers and status code because the internal fetcher state was released.
This change caches the response headers and status code from the most recent chunk fetcher before it finishes or is destroyed, and exposes them via the responseHeaders and statusCode getters. If no chunk requests were made, it falls back to the superclass to ensure initial connection creation failures are still reported correctly.