mitsuhiko/flask — Issue #410: Preserve request context in the face of new requests
Author: dplepage
Created: 2012-02-24 16:02:53+00:00
State: open

RequestContext.push pops and discards the top of the context stack if the top is preserved. Consequently, if you hit an exception in debug mode and drop into the debugger, but then make another request of the server, your debugger can no longer access the preserved context from the exception.

This is particularly a problem in Google Chrome, which follows each request with a request for "/favicon.ico". Any exception in debug mode will leave a preserved context on the stack, but will then immediately discard it when the favicon request arrives.