Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove temporary workaround for HTTP headers timeout #83419

Merged
merged 1 commit into from
Nov 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/core/server/http/http_tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ interface ListenerOptions {
export function createServer(serverOptions: ServerOptions, listenerOptions: ListenerOptions) {
const server = new Server(serverOptions);

// remove fix + test as soon as update node.js to v12.19 https://github.com/elastic/kibana/pull/61587
server.listener.headersTimeout =
listenerOptions.keepaliveTimeout + 2 * server.listener.headersTimeout;

server.listener.keepAliveTimeout = listenerOptions.keepaliveTimeout;
server.listener.setTimeout(listenerOptions.socketTimeout);
server.listener.on('timeout', (socket) => {
Expand Down
4 changes: 2 additions & 2 deletions test/server_integration/http/platform/headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function ({ getService }: FtrProviderContext) {
const config = getService('config');

describe('headers timeout ', () => {
it('issue-73849', async () => {
it('handles correctly. See issue #73849', async () => {
const agent = new Http.Agent({
keepAlive: true,
});
Expand Down Expand Up @@ -74,7 +74,7 @@ export default function ({ getService }: FtrProviderContext) {
}

await performRequest();
const defaultHeadersTimeout = 40 * oneSec;
const defaultHeadersTimeout = 60 * oneSec;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to 60sec in nodejs v12 nodejs/node#30071

Although we can remove this test if we are okay to rely on nodejs, I'd prefer to have it to make sure this functionality is not broken.

await delay(defaultHeadersTimeout + oneSec);
await performRequest();
});
Expand Down