Closed herudi closed 3 years ago
From what I understood with this commit, it partially alleviates the issue. I have tried it with both previous 2.0 version and the new 3.0 (after solving conflicts, obviously). It does fix the issue of hanging, but does not resolve the failure to upload file. It appears that for some reason the route in your demo triggers twice oO
Adding this check right before const chunk
or let chunk
declaration also helps to avoid the crash:
if (!bytes.byteLength) {
if (!isLast) return
return handler(reqWrapper, resWrapper)
}
However, neither way helps to implement multipart/form-data
file upload. Something is probably broken with HttpRequest class
at first I saw this error... this.slice is not define or not function.
before
_read (size) {
return this.slice(0, size)
}
I propose we fix these issues together in https://github.com/jkyberneees/low-http-server/pull/14 , because they are made against the newer code base. If you agree, we can close this thread
i agree. +1
Hi @jkyberneees @schamberg97, i'm try upload file but hang on second request. I've changed and fixed a few lines of code. please correct it again.
This example upload