Add custom headers for user agent and query string [MJ-829, MJ-830, MJ-831]

All tests pass.

If this is an acceptable compromise, the new headers can be stripped in RD-24.