Repository "does not appear to be an hg repository" after upgrading to 2.5.0

After upgrading to mercurial 2.5.0 earlier today, everybody started seeing the following when they tried to clone/push/pull to/from the repository:

abort: 'http://<server>/scm/hg/<repo>' does not appear to be an hg repository:
---%<--- (no content-type)
---%<---
!

I checked the scm manager logs, and there was nothing to indicate an error had occurred, and it appears that the transactions actually complete. When I served up the same repository with hg serv, everything worked fine, and there was no abort message. I did a pull with --debug, and found the following:

requested URL: 'http://<server>/scm/hg/<repo>?cmd=listkeys'
abort: 'http://<server>/scm/hg/<repo>' does not appear to be an hg repository:

It looks like version 2.5.0 does not resend the request, if the url /scm/hg/repo?cmd=capabilities returns error code 401. In earlier versions mercurial has resend the request with authentication informations.

Also wanted to point out that not all transactions actually work in this state. Certain users reported being unable to create new clones or push changes. I suspect that different versions of Mercurial acting as clients handle this error differently. However, it is safe to say that the repository is unusable in this state.