Jeremy wrote:
OK, after reviewing the links people sent in (thanks!) and the discussion at [1] I decided not to create a DPI.
I've hit a strange problem with getting the page to reload after the user confirms the user/password dialog. I show the dialog in Cache_parse_header() by calling fltk::Window::exec() and set a new CA_Reload flag (which is just like CA_Redirect, but simpler) if the user confirms. Cache_process_queue() then handles the CA_Reload. *But* Cache_process_queue() runs before the window is closed, and therefore before the flag is set. It looks as though the rest of the data comes in asynchronously while the dialog is still showing. If I change a_Auth_do_auth() to return immediately instead of showing a dialog then Cache_process_queue() runs after the flag is set, as I would expect.
Is there any way to stop this happening, or do I have to postpone showing the dialog until Cache_process_queue() runs?
Postponing it sounds right to me.