/// <reference types="node" />
import * as http from 'http';
export declare const UPSTREAM_RESPONSE_TIMEOUT_MESSAGE = "Upstream response timed out while streaming response body";
export declare function buildTimeoutSafeResponseHeaders(headers: http.IncomingHttpHeaders): http.OutgoingHttpHeaders;
export declare function writeForwardResponseHead(clientRes: http.ServerResponse, statusCode: number, headers: http.IncomingHttpHeaders): void;
export declare function writeTimeoutResponse(clientRes: http.ServerResponse, headers: http.IncomingHttpHeaders, message?: string): void;
export declare function attachUpstreamResponseTimeout(options: {
    upstreamReq: http.ClientRequest;
    upstreamRes: http.IncomingMessage;
    clientRes: http.ServerResponse;
    timeoutMs: number;
    onTimeout?: (error: Error) => void;
}): () => void;
//# sourceMappingURL=upstream-response-timeout.d.ts.map