Claude VM 44ba50f226 fix(basemap-tile): buffer body + drop upstream encoding/length headers
Initial proxy streamed upstream.body straight through with the upstream
Content-Encoding + Content-Length headers. Two ways that broke:

  - Node's fetch auto-decodes gzip/br responses, so the body coming
    out of upstream.body is already plain bytes. Forwarding
    Content-Encoding: gzip made the browser (and curl) try to gunzip
    plain bytes and fail.
  - Content-Length was the upstream (compressed) length, not the
    decoded byte count. Mid-stream the H2 layer noticed the mismatch
    and dropped with INTERNAL_ERROR (curl returned status=000 + a
    0-byte file).

Switch to arrayBuffer() + emit only Content-Type. Node serializes
the response with the right length and no encoding header, so the
browser gets the plain PBF / PNG / JSON it expects.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 10:47:18 +03:00
S
Description
No description provided
3.4 MiB
Languages
TypeScript 98.7%
Shell 0.4%
PLpgSQL 0.4%
Dockerfile 0.2%
CSS 0.1%
Other 0.1%