top of page

HTTP Telemetry Will Not Parse? Check Whether Gzip Was Already Decoded

Nov 10
4 min read

An HTTP response declares gzip, but the integration’s decompression step reports that the body is not compressed. The HTTP client may already have decoded it. Establish what bytes each layer receives before changing the telemetry schema or adding another decoder.


Concept illustration: HTTP Telemetry Will Not Parse? Check Whether Gzip Was Already Decoded
Original conceptual illustration; not a specific product, live software screen or customer installation.

Key takeaways

Content-Encoding describes a representation transformation; Content-Type describes the resulting media format. Know whether your HTTP library exposes coded bytes or already-decoded content, and apply each required transformation once.


1. Separate the response layers


RFC 9110 section 8.4 defines Content-Encoding as the coding applied beyond the media type’s own format. For example, a response can describe JSON with Content-Type while declaring gzip as its content coding. After the required coding is removed, the JSON parser still needs valid JSON.


Start a ProSight Software integration discussion with the source API’s contract and the actual HTTP client configuration. Support for a monitoring application does not establish that every data source, compression mode or custom import route is available in every deployment.


Keep HTTP message framing, content decompression, character decoding and JSON parsing as distinct observations. A message reaching a 200 response status is useful evidence, but it does not show which of those transformations the application has already performed.


2. Read the client’s documented behaviour


Check the exact HTTP library and version, including its supported automatic decompression settings. Inspect the response through an approved diagnostic tool at a clearly identified layer. The bytes exposed to application code may differ from the bytes transferred over the network.


Record the relevant response fields and the API used to obtain the body. Some software exposes a decoded text or object response; another method may expose raw content. Do not assume that a variable called raw or buffer establishes its actual processing history.


If an HTTP client already returns decoded JSON text, running that text through a gzip decoder again is a layer error. If coded bytes are returned, handing them straight to a text or JSON parser is another. Fix the documented boundary rather than guessing from a filename or screen preview.


3. Create two equivalent synthetic responses


A useful isolated acceptance fixture contains one harmless invented measurement record. Serve one response as uncompressed JSON and another as the same JSON with a correctly declared gzip coding. Test the integration’s supported mode against both and compare the final parsed record.


The expected result is the same asset identifier, numeric value and measurement timestamp, subject to the agreed interface contract. Also record the coded and decoded lengths at the appropriate layers. Those lengths need not match; comparing a decompressed body length with a coded Content-Length can produce a false failure.


Include a deliberately truncated compressed fixture and a validly decoded but malformed JSON fixture. They should fail at different stages with useful diagnostic reasons. Keep the originals so future library upgrades can be tested against the same evidence.


Identify the boundary before adding a decoder. Conceptual processing stages; actual client behaviour must be verified.
Conceptual processing stages; actual client behaviour must be verified.

Diagnostic checks


Failure

Likely boundary to inspect

Gzip decoder rejects readable JSON

Automatic decoding may already have run

JSON parser receives compressed bytes

Required content decoding may be missing

Decoded body parses but fields are wrong

Schema and measurement mapping


4. Bound decoding and preserve evidence


Set appropriate response-size, decoded-size, time and resource limits for the receiving integration. Compressed data can expand substantially. Limits should reflect the approved workload and library capabilities, and a rejected response should remain distinguishable from an empty successful dataset.


Do not fix an error by disabling transport security, accepting arbitrary content or repeatedly attempting guessed decoding chains. RFC 9110 specifies that multiple content codings are listed in their application order; the implementation must handle the documented chain correctly rather than removing layers until something looks readable.


Avoid storing secrets or entire operational payloads in routine logs. A sanitised fixture, status, declared coding, client configuration and exact failing layer are usually more useful than a large unsorted capture. Keep access to any retained operational evidence controlled.


5. Verify the complete handover


Once the body is correctly decoded and parsed, validate the telemetry schema, units, asset identity and source time separately. Compression correctness does not establish that the measurement is current or mapped to the right point. Reconcile a known fixture all the way to the intended result.


For a ProSight Custom project, agree who owns the source API, transport client, transformations and exception handling. Confirm supported capabilities and scope before selecting the implementation. This guide describes an engineering test approach, not a currently available automatic decompression control in the platform.


Retain the HTTP client version and relevant settings with the successful fixtures. Repeat those tests after a client-library, proxy or source-API change. A repeatable comparison is more reliable than a one-off manual removal of a header or decoding step.


Practical handover checklist


  1. Record Content-Type, Content-Encoding and the client version.

  2. Establish the actual body representation exposed to application code.

  3. Apply the required decoding once, then parse and validate.

  4. Compare equivalent fixtures and retain stage-specific failures.


Recommended equipment / related solutions


Review the ProSight Software platform overview to align the software scope with your measurement and reporting requirements. Confirm the selected deployment and integration route before implementation.


For an engineered interface or commissioning workflow, discuss ProSight Custom with a sanitised example and explicit acceptance criteria. Agree the deliverables rather than assuming a conceptual test is an available product feature.



Frequently asked question


Does changing the filename to .json decode a response?


No. A name does not transform bytes. Follow the declared response contract and the documented behaviour of the actual HTTP client.


Technical reference



Need help with your application?


Discuss this application and request a project assessment. Send the exact equipment models, interface documentation and a sanitised example. Confirm compatibility, supported functions and acceptance scope before purchase or deployment.






Comments


prosight-software-logo (1).png
bottom of page