[GH-ISSUE #12386] Compressed content (GZIP) with REST API. #33987

Open
opened 2026-04-22 17:11:55 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @eranif on GitHub (Sep 23, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12386

What is the issue?

Hello,
I am trying to send a compressed payload (I have a remote server and latency matters), I tried this call:

curl -X POST \
 -H "Accept:*/*" \
 -H "Content-Encoding:gzip" \
 -H "Content-Type:application/json" \
 -H "Host:127.0.0.1" \
--data-binary @req.json.gz http://<SERVER_IP>/api/show

and I am getting:

{"error":"invalid character '\\x1f' looking for beginning of value"}

If I change the payload from: req.json.gz -> req.json (its non gzipped version, but I keep the Content-Encoding:gzip header) - it works.
Seems like ollama ignores the header Content-Encoding:gzip.

req.json content is:

{"name":"qwen3-coder:30b"}

req.json.gz is created by running gzip -c req.json > req.json.gz

So the question is: does ollama support compression?

Originally created by @eranif on GitHub (Sep 23, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12386 ### What is the issue? Hello, I am trying to send a compressed payload (I have a remote server and latency matters), I tried this call: ```bash curl -X POST \ -H "Accept:*/*" \ -H "Content-Encoding:gzip" \ -H "Content-Type:application/json" \ -H "Host:127.0.0.1" \ --data-binary @req.json.gz http://<SERVER_IP>/api/show ``` and I am getting: ```json {"error":"invalid character '\\x1f' looking for beginning of value"} ``` If I change the payload from: `req.json.gz` -> `req.json` (its non gzipped version, but I keep the `Content-Encoding:gzip` header) - it works. Seems like `ollama` ignores the header `Content-Encoding:gzip`. `req.json` content is: ```json {"name":"qwen3-coder:30b"} ``` `req.json.gz` is created by running `gzip -c req.json > req.json.gz` So the question is: does `ollama` support compression?
GiteaMirror added the feature request label 2026-04-22 17:11:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#33987