title: Propagate http abort/close from nginx to uwsgi / Django
body: <p>I have a Django application web application, and I was wondering if it was possible to have nginx propagate the abort/close to uwsgi/Django. </p>
  
  <p>Basically I know that nginx is aware of the premature abort/close because it defaults to <code>uwsgi_ignore_client_abort</code> to "off", and you get nginx 499 errors in your nginx logs when requests are aborted/closed before the response is sent. Once uwsgi finishes processing the request it throws an "IO Error" when it goes to return the response to nginx. </p>
  
  <p>Turning <code>uwsgi_ignore_client_abort</code> to "on" just makes nginx unaware of the abort/close, and removes the uwsgi "IO Errors" because uwsgi can still write back to nginx.</p>
  
  <p>My use case is that I have an application where people page through some ajax results very quickly, and so if the quickly page through I abort the pending ajax request for the page that they skipped, this keeps the client clean and efficient. But this does nothing for the server side (uwsgi/Django) because they still have to process every single request even if nothing will be waiting for the response.</p>
  
  <p>Now obviously there may be certain pages, where I don't want the request to be prematurely aborted for any reason. But I use celery for long running requests that may fall into that category.</p>
  
  <p>So is this possible? <code>uwsgi's</code> hariakari setting makes me think that it is at some level.... just can't figure out how to do it.</p>