Better handle empty Origin header

Add test case.