buger/gor — pull request #99 by mantasmatelis (2014-06-11 19:59:00+00:00)
Title: Allow filtering by regex of URL or specific header, consistent filtering by hash of header

The changes in this pull request allow for filtering of requests to

1) those whose URL matches a specific regular expression. This allows for the redirection of only certain types of traffic to mirror, for example, requests that hit the api as opposed to the entire host.
2) those with Headers matching specific regular expressions. This allows for only taking requests that are, for example, only for a specific API version.
3) a specific fraction of requests, decided on the hash of a specific header value. This allows for, for example, taking all of the requests of one-sixteenth of users, if the user id, e-mail, or any other identifying information is passed in a header. The specific hash in use is the FNV-32a hash, chosen for speed (one pass over data, ~two CPU instructions per byte of header) while maintaining desirable hash properties.

The added options come with proper help documentation, and associated changes in the README.md.