Forum Discussion

bradvoth_189339's avatar
bradvoth_189339
Icon for Nimbostratus rankNimbostratus
Apr 27, 2015

Host Param must match Request

I've run into an issue where I need to reject traffic where the Request host and the host value of the request don't match. For example I would need to reject the following request

GET http://google.com/the/uri HTTP/1.1
Host: someotherhost.com

But not reject

GET http://someotherhost.com/the/uri HTTP/1.1
Host: someotherhost.com

However, the notes in [HTTP::uri] state that the command does not include the host portion.

Would [HTTP::req] provide the information about the request I need? Or is there a better way?

1 Reply

  • Interesting. How are you submitting that test traffic? When I submit via curl manually setting the host header to someotherhost.com but then using a URL of http://google.com/the/uri, the only thing that comes through is what was provided in the host header, whether supplied by HTTP::host or HTTP::request.