Return 403 on access denied - HTTP Status Code

Issue #394 resolved
created an issue

It would be nice if requests that hit an access denied message returned 403 / 401 as appropriate for the HTTP Status code.

This would ease troubleshooting...


Comments (11)

  1. August Zajonc

    A quick follow-up.

    When doing a wget --no-check-certificate something isn't working right.

    I also tried with curl, forcing basic authentication as an additional option without success. Get an access denied.

    I also added --auth-no-challenge for the weget attempts, again without success.

    Firefox 3.0.x also issues a warning in this situation, but at least allows me to continue.

    Haven't dug in, but there may be some nonstandard something going on if both firefox and more importantly for me wget complain. Perhaps this is only for private repos?

    I'd love to get wget or curl or even firefox working more smoothly here. But key goal is curl / wget.

    Public repos do not have this problem it seems.

  2. August Zajonc

    I tried both negotiate and basic. For digest it needs to pick the challenge up properly. Do you see the error in Firefox 3 when doing a private repo /tip.gz? I suspect it's a similar issue.

  3. Jesper Noehr

    Right, the Firefox error you get makes sense, since we don't *require* HTTP auth while you are logged in to the site (via sessions/cookies). You can download 'tip.gz' without providing your username and password at that point.

    Now with regards to automated fetching, you *must* use Digest, as we do not support basic. The challenge should be picked up properly, even mercurial does this correctly (when using hg on the command line.) If you have problems using curl/wget, I'd like a full verbose traceback of how they fail.

  4. Log in to comment