Don't write headers after they were already sent
Merge pull request #16 from ShortSharpCode/header-race

Don't write headers after they were already sent