You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Shazron <sh...@gmail.com> on 2013/05/03 01:52:04 UTC

[iOS] XmlHttpRequest and 401 Unauthorized

To summarize, this is an iOS thing, not a Cordova thing. We are just trying
to work around it.

JIRA issue:
https://issues.apache.org/jira/browse/CB-2415

The proposed workaround is intrusive in that we basically need to create
our own NSURLConnection for each shouldStartLoadRequest call, and handle
the authentication challenge by letting it proceed (thus the call does not
"hang").

I'm not sure of the impact of this, but it touches every call.

The only workaround in JavaScript is to do a setTimeout for the call, but
then we never get a 401 status code of course.

Thoughts?

Re: [iOS] XmlHttpRequest and 401 Unauthorized

Posted by Zach White <wh...@gmail.com>.
Unless something has changed since I last looked, I thought the Android
issue was resolved: https://issues.apache.org/jira/browse/CB-2284.


On Thu, May 2, 2013 at 8:28 PM, Jesse <pu...@gmail.com> wrote:

> Not just iOS + Android ... https://issues.apache.org/jira/browse/CB-2428
>
>
> @purplecabbage
> risingj.com
>
>
> On Thu, May 2, 2013 at 4:56 PM, Joe Bowser <bo...@gmail.com> wrote:
>
> > Applicable Android counterpart:
> > https://issues.apache.org/jira/browse/CB-2962
> >
> > On Thu, May 2, 2013 at 4:54 PM, Joe Bowser <bo...@gmail.com> wrote:
> > > I think this is a webkit thing, since Android has the same problem.
> > > We have some authorization code, but I'm pretty certain that it
> > > doesn't do the right thing.  That being said, I have no idea what the
> > > right thing is.
> > >
> > > On Thu, May 2, 2013 at 4:52 PM, Shazron <sh...@gmail.com> wrote:
> > >> To summarize, this is an iOS thing, not a Cordova thing. We are just
> > trying
> > >> to work around it.
> > >>
> > >> JIRA issue:
> > >> https://issues.apache.org/jira/browse/CB-2415
> > >>
> > >> The proposed workaround is intrusive in that we basically need to
> create
> > >> our own NSURLConnection for each shouldStartLoadRequest call, and
> handle
> > >> the authentication challenge by letting it proceed (thus the call does
> > not
> > >> "hang").
> > >>
> > >> I'm not sure of the impact of this, but it touches every call.
> > >>
> > >> The only workaround in JavaScript is to do a setTimeout for the call,
> > but
> > >> then we never get a 401 status code of course.
> > >>
> > >> Thoughts?
> >
>

Re: [iOS] XmlHttpRequest and 401 Unauthorized

Posted by Jesse <pu...@gmail.com>.
Not just iOS + Android ... https://issues.apache.org/jira/browse/CB-2428


@purplecabbage
risingj.com


On Thu, May 2, 2013 at 4:56 PM, Joe Bowser <bo...@gmail.com> wrote:

> Applicable Android counterpart:
> https://issues.apache.org/jira/browse/CB-2962
>
> On Thu, May 2, 2013 at 4:54 PM, Joe Bowser <bo...@gmail.com> wrote:
> > I think this is a webkit thing, since Android has the same problem.
> > We have some authorization code, but I'm pretty certain that it
> > doesn't do the right thing.  That being said, I have no idea what the
> > right thing is.
> >
> > On Thu, May 2, 2013 at 4:52 PM, Shazron <sh...@gmail.com> wrote:
> >> To summarize, this is an iOS thing, not a Cordova thing. We are just
> trying
> >> to work around it.
> >>
> >> JIRA issue:
> >> https://issues.apache.org/jira/browse/CB-2415
> >>
> >> The proposed workaround is intrusive in that we basically need to create
> >> our own NSURLConnection for each shouldStartLoadRequest call, and handle
> >> the authentication challenge by letting it proceed (thus the call does
> not
> >> "hang").
> >>
> >> I'm not sure of the impact of this, but it touches every call.
> >>
> >> The only workaround in JavaScript is to do a setTimeout for the call,
> but
> >> then we never get a 401 status code of course.
> >>
> >> Thoughts?
>

Re: [iOS] XmlHttpRequest and 401 Unauthorized

Posted by Joe Bowser <bo...@gmail.com>.
Applicable Android counterpart: https://issues.apache.org/jira/browse/CB-2962

On Thu, May 2, 2013 at 4:54 PM, Joe Bowser <bo...@gmail.com> wrote:
> I think this is a webkit thing, since Android has the same problem.
> We have some authorization code, but I'm pretty certain that it
> doesn't do the right thing.  That being said, I have no idea what the
> right thing is.
>
> On Thu, May 2, 2013 at 4:52 PM, Shazron <sh...@gmail.com> wrote:
>> To summarize, this is an iOS thing, not a Cordova thing. We are just trying
>> to work around it.
>>
>> JIRA issue:
>> https://issues.apache.org/jira/browse/CB-2415
>>
>> The proposed workaround is intrusive in that we basically need to create
>> our own NSURLConnection for each shouldStartLoadRequest call, and handle
>> the authentication challenge by letting it proceed (thus the call does not
>> "hang").
>>
>> I'm not sure of the impact of this, but it touches every call.
>>
>> The only workaround in JavaScript is to do a setTimeout for the call, but
>> then we never get a 401 status code of course.
>>
>> Thoughts?

Re: [iOS] XmlHttpRequest and 401 Unauthorized

Posted by Joe Bowser <bo...@gmail.com>.
I think this is a webkit thing, since Android has the same problem.
We have some authorization code, but I'm pretty certain that it
doesn't do the right thing.  That being said, I have no idea what the
right thing is.

On Thu, May 2, 2013 at 4:52 PM, Shazron <sh...@gmail.com> wrote:
> To summarize, this is an iOS thing, not a Cordova thing. We are just trying
> to work around it.
>
> JIRA issue:
> https://issues.apache.org/jira/browse/CB-2415
>
> The proposed workaround is intrusive in that we basically need to create
> our own NSURLConnection for each shouldStartLoadRequest call, and handle
> the authentication challenge by letting it proceed (thus the call does not
> "hang").
>
> I'm not sure of the impact of this, but it touches every call.
>
> The only workaround in JavaScript is to do a setTimeout for the call, but
> then we never get a 401 status code of course.
>
> Thoughts?