Error NotAuthorized returning a 403 instead of a 401. #21

merged 3 commits into from Aug 17, 2012


None yet
3 participants

coen-hyde commented Mar 16, 2012

The error NotAuthorized is returning a 403 'forbidden' response code when it should be 401. I have changed the NotAuthorized error to return a 401 and added a Forbidden error that returns 403.

Bwen commented Aug 13, 2012

Would be nice to get this request in.

Having the same issue.

Bwen commented Aug 14, 2012

Would be nice to add the following as well:
this.headers = {'Content-Type': 'text/plain', 'WWW-Authenticate': 'Basic realm="'+ (realm || 'Journey REST API') +'"'};

For the 401 to make it browser friendly. Apparently most browser do not send the auth header if they dont get this header. Even if its in the url raw.

cloudhead added a commit that referenced this pull request Aug 17, 2012

Merge pull request #21 from coen-hyde/master
Error NotAuthorized returning a 403 instead of a 401.

@cloudhead cloudhead merged commit 94a9e93 into cloudhead:master Aug 17, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment