Yes I don't like too but I can't put it on line 162 because if the application is a generator, start_response() won't be called until the generator is started. Maybe I could add it after the next() on line 167.