fixes backend gone away mixed with empty header strings
minimal refactoring
normalised exceptions
Merge pull request #2 from zelgerj/master

fixes backend gone away mixed with empty header strings