Support new repo HTTP features, and add useragent