Fill the gateway correctly.
Add the host field to the http query. It's needed when the
server publishes vhosts.
Remove commented code