pagespeed/ngx_pagespeed — pull request #107 by jeffkaufman (2012-12-12 19:42:31+00:00)
Title: base fetch: add DeleteWhenDone()

When a request is cancelled part way through nginx calls the cleanup handler.
This was set to delete the base fetch, but the proxy fetch was sometimes not
done with it yet. It's only safe to delete the base fetch after the proxy fetch
has called HandleDone() on it. Add a DeleteWhenDone() method to the base fetch:

- if HandleDone() has already been called:
- delete this
- otherwise:
- wait until it does get called:
- delete this