http: fix and cleanup test

Using hasOwnProperty instead of in.

Removing superfluous parens.