Squashed further aborted bugs (#1 was more persistent, than we thought 😂). My other project, Fyrejet framework uses its own uWebSockets.js compatibility layer that was also based upon 0http's low server. Naturally, I wanted to replace that compatibility layer with low-http-server to maintain less code in the long-term. Unfortunately, express's tests that my other project uses revealed a regression with res.sendFile:
1) res
.sendFile(path)
should not error if the client aborts:
Uncaught Error: the string "Invalid access of discarded (invalid, deleted) uWS.HttpResponse/SSLHttpResponse." was thrown, throw an Error :)
at process._fatalException (internal/process/execution.js:165:25)
That means aborted checks that we have here are NOT fully complete. This PR changes that.
Squashed header bugs. Fyrejet also uses some Restana's tests, since its core is based on Restana and it borrows Restana's res.send in certain operating modes. It is also possible this error might occur with unmodified Restana, but I haven't checked it yet. Unfortunately, it appears that sometimes, header contents may include header name. I don't like the fix, but it's the best I could think of.
1) All Responses
should GET 200 and html content on /html-string:
Error: expected "content-type" of "text/html; charset=utf-8", got "content-type,text/html; charset=utf-8"
at Test._assertHeader (node_modules/supertest/lib/test.js:249:12)
at Test._assertFunction (node_modules/supertest/lib/test.js:283:11)
at Test.assert (node_modules/supertest/lib/test.js:173:18)
at localAssert (node_modules/supertest/lib/test.js:131:12)
at /Volumes/Work/fyrejet/node_modules/supertest/lib/test.js:128:5
at Test.Request.callback (node_modules/superagent/lib/node/index.js:716:12)
at IncomingMessage.<anonymous> (node_modules/superagent/lib/node/index.js:916:18)
at endReadableNT (_stream_readable.js:1221:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Minor callback changes with facade.close and facade.listen funcs (for convenience).
aborted
bugs (#1 was more persistent, than we thought 😂). My other project,Fyrejet
framework uses its own uWebSockets.js compatibility layer that was also based upon0http
'slow
server. Naturally, I wanted to replace that compatibility layer withlow-http-server
to maintain less code in the long-term. Unfortunately,express
's tests that my other project uses revealed a regression withres.sendFile
:That means
aborted
checks that we have here are NOT fully complete. This PR changes that.Fyrejet
also uses some Restana's tests, since its core is based onRestana
and it borrows Restana'sres.send
in certain operating modes. It is also possible this error might occur with unmodifiedRestana
, but I haven't checked it yet. Unfortunately, it appears that sometimes, header contents may include header name. I don't like the fix, but it's the best I could think of.facade.close
andfacade.listen
funcs (for convenience).