<html><body><div>Hi,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>I'm seeing an issue with the autoindex module (version 1.9.5) where when an error is encountered while generating the index, NGINX does not send any response back to the client.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>I ran through the debugging and what I found is that the header is sent, but doesn't actually make it to the socket buffer because in ngx_http_write_filter returns early because size < clcf->postpone_output.  This seemed normal to me.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Then during generation of the index, an error is encountered and ngx_http_autoindex_error() is called.  Since r->header_sent is 1, NGX_ERROR is returned and the socket is closed without sending the header or any additional error response<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Chrome and Firefox end up displaying error pages about "no response" or "the connection was reset" when TCP connection was closed without a response.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Should NGINX be doing something better?  Since the response is chunk encoded, I understand the header is already sent, but is there a better way to report errors while generating a chunked response? (although autoindex doesn't seem to actually generate multiple chunks).<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thanks,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Joel<br data-mce-bogus="1"></div></body></html>