Skip to content

Commit 71b70fb

Browse files
authored
chore: remove finalhandler workaround for http2 (#228)
1 parent a309970 commit 71b70fb

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

src/server.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,26 +1568,6 @@ class Server<
15681568
},
15691569
});
15701570

1571-
const isHTTP2 =
1572-
(this.options.server as ServerConfiguration<A, S>).type === 'http2';
1573-
1574-
if (isHTTP2) {
1575-
// TODO patch for https://github.com/pillarjs/finalhandler/pull/45, need remove then will be resolved
1576-
middlewares.push({
1577-
name: 'http2-status-message-patch',
1578-
middleware: (_req: Request, res: Response, next: NextFunction) => {
1579-
Object.defineProperty(res, 'statusMessage', {
1580-
get() {
1581-
return '';
1582-
},
1583-
set() {},
1584-
});
1585-
1586-
next();
1587-
},
1588-
});
1589-
}
1590-
15911571
// compress is placed last and uses unshift so that it will be the first middleware used
15921572
if (this.options.compress) {
15931573
middlewares.push({

0 commit comments

Comments
 (0)