added if statement to prefent nullpointer exception when only a http header is sent.
Merge branch 'temp1' This is a small test if I can merge