Better handle empty Origin header

Add test case.
Merge pull request #3 from amedia/improve-empty-origin-handling

Better handle empty Origin header