View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0011128 | Taler | merchant backend | public | 2026-02-21 02:14 | 2026-02-21 07:14 |
| Reporter | Windfisch | Assigned To | Christian Grothoff | ||
| Priority | normal | Severity | trivial | Reproducibility | have not tried |
| Status | closed | Resolution | no change required | ||
| Product Version | 1.4 | ||||
| Target Version | 1.5 | Fixed in Version | 1.5 | ||
| Summary | 0011128: Binary garbage on PATCH /instances/foo/private with *_delay==0 | ||||
| Description | When PATCHing a /instances/foo/private endpoint with either default_{pay,refund,wire_transfer}_delay set to 0, the HTTP request returns binary garbage. The response seems to be the desired (error) response, but zlib-compressed. Apparently some response header is not set which indicates to curl that the response is actually compressed, so curl won't uncompress it. tested with v1.4.1-dev.1 | ||||
| Steps To Reproduce | Create a "stonks2" merchant instance. Update the settings once, capture the PATCH request in the browser and "copy as cURL", which yields something similar to below: WIRE=0; PAY=60; REFUND=60; curl 'https://backend.w.icmp.camp/instances/stonks2/private' -X PATCH -H 'Accept-Encoding: gzip, deflate, br, zstd' -H 'Content-Type: application/json' -H 'Authorization: Bearer secret-token:REDACTED' --data-raw '{"default_pay_delay":{"d_us":'$PAY'000000},"default_refund_delay":{"d_us":'$REFUND'000000},"default_wire_transfer_delay":{"d_us":'$WIRE'000000},"use_stefan":false,"name":"stonks2","email_validated":false,"phone_validated":false,"merchant_pub":"GE04TYN95S5CWNBBN3GWK3W2SM0WKRBSQ6X3A4MPT4KQ02JD4A40","address":{},"jurisdiction":{},"default_wire_transfer_rounding_interval":"NONE","auth":{"method":"token"}}' ; echo results in binary garbage. when piped through `file -`, file reports "zlib compressed data" WIRE=0; PAY=60; REFUND=60; curl 'https://backend.w.icmp.camp/instances/stonks2/private' -X PATCH -H 'Accept-Encoding: gzip, deflate, br, zstd' -H 'Content-Type: application/json' -H 'Authorization: Bearer secret-token:EYADCF1E372W34G3CZ36EQJNPTPQA7PM9AQX8V6B7W8CXVENT8ZG' --data-raw '{"default_pay_delay":{"d_us":'$PAY'000000},"default_refund_delay":{"d_us":'$REFUND'000000},"default_wire_transfer_delay":{"d_us":'$WIRE'000000},"use_stefan":false,"name":"stonks2","email_validated":false,"phone_validated":false,"merchant_pub":"GE04TYN95S5CWNBBN3GWK3W2SM0WKRBSQ6X3A4MPT4KQ02JD4A40","address":{},"jurisdiction":{},"default_wire_transfer_rounding_interval":"NONE","auth":{"method":"token"}}' | zlib-flate -uncompress % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 557 100 170 100 387 1303 2968 --:--:-- --:--:-- --:--:-- 4284 { "code": 22, "hint": "The JSON in the client's request was malformed. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers." } Note how the binary data actually uncompresses to a reasonable JSON response. The problem does not occur when removing the Accept-Encoding header. | ||||
| Tags | No tags attached. | ||||
|
|
(1) Content-encoding: deflate *is* set by the server, and wireshark does correctly decompress and show the response. (2) What freaks out *our* JQ parser is the "0000000" instead of "0" for the default_wire_transfer_delay, hence the error message. That seems strict, but OK. (3) Because you manually requested compression, curl is *designed* to leave decompression to you. So the behavior is expected. |
|
|
Try using 'curl --compressed' instead... |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-02-21 02:14 | Windfisch | New Issue | |
| 2026-02-21 06:50 | Christian Grothoff | Assigned To | => Christian Grothoff |
| 2026-02-21 06:50 | Christian Grothoff | Status | new => assigned |
| 2026-02-21 07:12 | Christian Grothoff | Note Added: 0027838 | |
| 2026-02-21 07:13 | Christian Grothoff | Status | assigned => resolved |
| 2026-02-21 07:13 | Christian Grothoff | Resolution | open => no change required |
| 2026-02-21 07:13 | Christian Grothoff | Fixed in Version | => 1.5 |
| 2026-02-21 07:13 | Christian Grothoff | Severity | minor => trivial |
| 2026-02-21 07:13 | Christian Grothoff | Target Version | => 1.5 |
| 2026-02-21 07:13 | Christian Grothoff | Status | resolved => closed |
| 2026-02-21 07:14 | Christian Grothoff | Note Added: 0027839 |