You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a json response like {"foo": "bar"}. It's content-length is 14
I added a wasm to wrap the json response to sth like {"code": 0, "err": "", data: {"foo": "bar"}}. It's content-length is 44.
I tried calling addResponseHeader("content-length", "44") and replaceResponseHeader("content-length", "44") in onResponseBody. Neither worked. And curl complains: curl: (18) transfer closed with 30 bytes remaining to read`.
How can I update content-length after response body is modified?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi, I have a json response like
{"foo": "bar"}
. It's content-length is 14I added a wasm to wrap the json response to sth like
{"code": 0, "err": "", data: {"foo": "bar"}}
. It's content-length is 44.I tried calling
addResponseHeader("content-length", "44")
andreplaceResponseHeader("content-length", "44")
inonResponseBody. Neither worked. And curl complains:
curl: (18) transfer closed with 30 bytes remaining to read`.How can I update content-length after response body is modified?
Thanks.
The text was updated successfully, but these errors were encountered: