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
I am trying to track size of received data of http response (Http.Receiving).
Elm codes works fine.
But size of Http.Receiving seems to have a problem.
Specifically, size of Http.Receiving will be set Nothing when Content-Length is more than 1023 byte.
If Content-Length smaller than 1024 byte, it is no problem.
I think event.lengthComputable returns false when Content-Length more than 1023 byte.
But i don't know why realize so...
I am trying to track size of received data of http response (Http.Receiving).
Elm codes works fine.
But
size
ofHttp.Receiving
seems to have a problem.Specifically,
size
ofHttp.Receiving
will be setNothing
whenContent-Length
is more than1023 byte
.If
Content-Length
smaller than1024 byte
, it is no problem.I think
event.lengthComputable
returnsfalse
whenContent-Length
more than1023 byte
.But i don't know why realize so...
https://github.com/elm/http/blob/master/src/Elm/Kernel/Http.js#L183
I wrote following debug print function execute in
update
.Result of response with
1023 byte
:Receiving: received=1023, size=1023: (Loading,<internals>)
Receiving: received=1023, size=1023: (Loading,<internals>)
Result of response with
1024 byte
:Receiving: received=1024, size=-1: (Loading,<internals>)
Receiving: received=134, size=-1: (Loading,<internals>)
received
has problem too on Firefox.Is there something workaround?
The text was updated successfully, but these errors were encountered: