(TK-33) Preserve query params in munging

Preserve query parameters when a location header is munged.
Also remove null pointer exception caused by having a nil
server in the filterRequestHeader method.