Picture of Rico 1837
Registered 10 years 245 days
Rico 1837 Friday, 11 February 2022, 02:53 PM
[JS] Webserver request.sendResponse(xx) and request.cancel(xx)
when terminating a request with request.sendResponse(xx); the ResponseCode is always 200 and not one of [201 204 207 403 405 409 412 423 502 507].
when terminating a request with request.sendResponse(401); (401 isnt supported according to the docs), the request is answered with 200 and the header is present in the response.
when terminating a request with request.cancel(401); the ResponseCode is 500 (server error, because 401 isnt supported according to the docs.
request.cancel(xxx); doesnt seem to support ResponseHeaders at all, they are not present in the responses with [404, 400, 451, 411, 402, 500].

So i like to implement Digest Auth on the webserver. and to do so, i have to send a 401 with the 'WWW-Authenticate' Header.
the 401 should be a supported responsecode in the request.sendResponse(xx);

Minor: the body of a request.cancel(500); Response states "Not implemented on this server.".

tested with generic app 136268 sr8
regards
webserverresponseservice.zip
← You can define your color theme preference here