Fix regex and add X-AUTH and X_AUTH options

See ticket 98904 on rt.cpan.org