This doesn't work because the response has already been written by the DSL. The headers don't appear in the response.
I understand that you can't write to the response stream if it's already been written so it looks like this approach is doomed to failure unless someone has an additional ideas.
(FYI, the reason I'm writing these stats to the response is so I can collect some stats on network performance as some of the application clients have poor connections due to their geographical location)
If anyone has a work around or any additional ideas I would be most grateful. Thanks in advance.