Update canonical query string calculation to match server