mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-08-27 03:25:14 -05:00
Support HEAD requests part 2
Co-authored-by: Slayer95 <ivojulca@hotmail.com>
This commit is contained in:
@@ -162,7 +162,7 @@ export class StaticServer {
|
||||
// If `alreadySent`, it's been taken care of in `this.stream`.
|
||||
if (!result.alreadySent && !errorCallback?.(result)) {
|
||||
res.writeHead(result.status, result.headers);
|
||||
if (result.status >= 400) {
|
||||
if (result.status >= 400 || req.method === 'HEAD') {
|
||||
res.write(`${result.status} ${result.message}`);
|
||||
}
|
||||
res.end();
|
||||
|
||||
Reference in New Issue
Block a user