Bug #3441 - Rewrite xhr module