baa2w
baa2w

Reputation: 374

Nginx doesn't honor connection: close

I have the following php code, that works fine when running under Apache, but I was not able to make it work under Nginx:

ignore_user_abort(true);
header('Connection: close');
header('Content-length: 0');
session_write_close();
flush();
// continue on background

Under Nginx, in my experience, the browser keeps connection alive until time-out which produces '504 Gateway Time-out'.

Does anyone know how to fix it?

Thanks!

Upvotes: 0

Views: 331

Answers (1)

Fre Akus
Fre Akus

Reputation: 107

Can't test this atm, but try fastcgi_finish_request()

Upvotes: 3

Related Questions