[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting diagnostics in a program



Hello,

I'm not familiar with 2-legged OAuth.  401 is supposed to be returned 
alongside the www-authenticate header, indicating that you needed to 
supply a userid/password.

HTTPAPI overrides the error message, because users of HTTPAPI were 
getting messages like 'Unauthorized' or worse 'You must pass the 
authenticate header' and didn't understand what that meant.  So HTTPAPI 
overrides the message to make it clear that they are to specify a 
userid/password.

So, the answer is:  No, you can't get this message, at least, not 
without modifying HTTPAPI.



On 2/23/2012 6:54 PM, James Lampert wrote:
> In my Google Calendar interface project:
>
> If I have debugging turned on, I get this in the debugging log:
>
>> recvresp(): entered
>> HTTP/1.1 401 Unknown authorization header
>
> if I have a bogus domain secret, but I get this:
>
>> recvresp(): entered
>> HTTP/1.1 401 Token invalid - AuthSub token has wrong scope
>
> if the domain secret is good, but the Calendar scope is not enabled for
> 2-legged OAuth.
>
> But I get nothing in the buffer, and in both cases, http_error just returns:
>> This page requires a user-id&  password
>
> Is there a way for me to get the detailed 401 message? Preferably a way
> to get it whether debugging is turned on or off? The two situations do
> have different causes, and different resolutions.
>
> --
> JHHL
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------