You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Jochen Magnus (JIRA)" <ji...@apache.org> on 2012/09/10 17:06:08 UTC

[jira] [Created] (CB-1406) HTTP Get via XHR always return status 0 under iOS 6 (Beta 4)

Jochen Magnus created CB-1406:
---------------------------------

             Summary: HTTP Get via XHR always return status 0 under iOS 6 (Beta 4)
                 Key: CB-1406
                 URL: https://issues.apache.org/jira/browse/CB-1406
             Project: Apache Cordova
          Issue Type: Bug
          Components: iOS
    Affects Versions: 2.1.0
         Environment: all iOS devices and simulators
            Reporter: Jochen Magnus
            Assignee: Shazron Abdullah


HTTP Requests in Web Workers are working well under iOS 5 and 6 Beta in Web Apps (HTML5 apps), but not in a native app using Cordova in iOS 6 (Beta 4).

HTTPRequests in the Web Workers ending always with http.readyState==4  (that's ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13452305#comment-13452305 ] 

Jochen Magnus commented on CB-1406:
-----------------------------------

Shazron,

yes, I use 2.1.0rc2 in all test cases.

jo
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Shazron Abdullah
>              Labels: HTTP, WebWorker, XHR
>         Attachments: testworker.js, workertest.html
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466193#comment-13466193 ] 

Jochen Magnus edited comment on CB-1406 at 9/29/12 11:13 PM:
-------------------------------------------------------------

I made some further tests and found that the problem with XHR requests in webworkers in a native app is caused by the Same Origin Policy (SOP). This only happens with iOS 6 not with iOS 5. 

With the remote debugger which is newly available in Safari 6 for iOS 6 apps the console shows: "XMLHttpRequest cannot load http://live.rhein-zeitung.de/test.txt. Origin file:// is not allowed by Access-Control-Allow-Origin."

I enhanced my test case so it could now load alternatively by XHR in the main applications thread or by XHR via webworker. No problem occurs in the first case, but the SOP security issue happens in the second case, because there is "Origin" HTTP header field witch contains "file://" (in the first case, there seems to be no such header field).

A workaround is to allow Cross Domain Scripting in the webservers config (for Apache webserver add "Header add Access-Control-Allow-Origin file://" to the config), but this may be a security problem. I tested it, but I am unsure about the security issue when allowing 'file://' or asterisk.
 So I would prefer a "real" solution.
                
      was (Author: ioma):
    I made some further tests and found that the problem with XHR requests in webworkers in a native app is caused by the Same Origin Policy (SOP). This only happens with iOS 6 not with iOS 5. 

With the remote debugger which is newly available in Safari 6 for iOS 6 apps the console shows: "XMLHttpRequest cannot load http://live.rhein-zeitung.de/test.txt. Origin file:// is not allowed by Access-Control-Allow-Origin."

I enhanced my test case so it could now load alternatively by XHR in the main applications thread or by XHR via webworker. No problem occurs in the first case, but the SOP security issue happens in the second case, because there is "Origin" HTTP header field witch contains "file://" (in the first case, there seems to be no such header field).

A workaround is to allow Cross Domain Scripting in the webservers config (for Apache webserver add "Header add Access-Control-Allow-Origin *" to the config), but this may be a security problem. I tested it, but I am unsure about the security issue when allowing '*' or 'file://'.
 So I would prefer a "real" solution.

                  
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest2.tar.bz2, workertest.html, xhr_tests.png
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Michal Mocny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465594#comment-13465594 ] 

Michal Mocny commented on CB-1406:
----------------------------------

Test cases are great! I'll take a look as soon as I can.
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest.html, workertest.tar.bz2
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Magnus updated CB-1406:
------------------------------

    Attachment: workertest-native.zip

Shazron,

I can confirm that the problem is caused by UIWebView and not by Cordova. I made a sample program using a simple UIWebView with the same JS code but without the use of Cordova: the same violation of the Same Origin Policy happens. Probably due to a wrong HTTP header.

I filed a bug (#12793598) to Apple and I hope this time it is not like exposing a message in a bottle...
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.3.0
>
>         Attachments: testworker.js, workertest2.tar.bz2, workertest.html, workertest-native.zip, xhr_tests.png
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Michal Mocny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453352#comment-13453352 ] 

Michal Mocny commented on CB-1406:
----------------------------------

Jochen, ah thanks, good catch.

Testing with your live example, it works fine in both ios6 safari and in an ios6 webview, which rules out this just being a bug in ios6 webview.
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Shazron Abdullah
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest.html
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Magnus updated CB-1406:
------------------------------

    Attachment:     (was: index.html)
    
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest.html
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Michal Mocny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453279#comment-13453279 ] 

Michal Mocny commented on CB-1406:
----------------------------------

I just tried the attached test case with these results:

- on ios6 safari, readyState 4, status 0
- on ios6 webview, readyState 4, status 0
- on ios5 safari, readyState 4, status 0

I did not test with cordova, since I am not reproducing the expected results as is (though clearly something is wrong since status is 0).  It seems like either the attached test case is invalid, or there is some long standing ios bug with web workers/XHR.  I'm not digging further for now, just wanted to give another data point.
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Shazron Abdullah
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest.html
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Magnus updated CB-1406:
------------------------------

    Summary: HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)  (was: HTTP Get via XHR always return status 0 under iOS 6 (Beta 4))
    
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Shazron Abdullah
>              Labels: HTTP, WebWorker, XHR
>
> HTTP Requests in Web Workers are working well under iOS 5 and 6 Beta in Web Apps (HTML5 apps), but not in a native app using Cordova in iOS 6 (Beta 4).
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-1406:
---------------------------------

    Fix Version/s: 2.2.0

Putting this on the list for 2.2.0 since that will be the first release after iOS 6 goes GM.
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Shazron Abdullah
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest.html
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13452162#comment-13452162 ] 

Shazron Abdullah commented on CB-1406:
--------------------------------------

I assume you tested with 2.1.0rc2?
Please provide the web worker test case that you used (HTML+JS) so we can replicate the same scenario, as well as verify in other environments. I'm curious if it's just a UIWebView thing - I'll have to test with a plain project with just a UIWebView.
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Shazron Abdullah
>              Labels: HTTP, WebWorker, XHR
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah reassigned CB-1406:
------------------------------------

    Assignee: Michal Mocny  (was: Shazron Abdullah)
    
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest.html
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453329#comment-13453329 ] 

Jochen Magnus edited comment on CB-1406 at 9/12/12 6:36 AM:
------------------------------------------------------------

Michal,
probably you got the status 0 result due to XHR's same origin policy. The source file and the test.txt file, which my examples try to load, must have the same server origin in the case of a webapp. 

I had tested exactely that the status 0 problem I described, is *not* a result of the same origin policy. The webapp example is working either with iOS 5 or iOS 6. The native version, using Cordova 2.1rc2, is working only with iOS 5 (in this case the same origin policy does not matter!)

You can call my working example from http://live.rhein-zeitung.de/workertest.html 
                
      was (Author: ioma):
    Michal,
probably you got the status 0 result due to XHR's same origin policy. The source file and the test.txt file, which my examples try to load, must have the same server origin. 

I had tested exactely that the status 0 problem I described, is *not* a result of the same origin policy. The webapp example is working either with iOS 5 or iOS 6. The native version, using Cordova 2.1rc2, is working only with iOS 5. 

You can call my working example from http://live.rhein-zeitung.de/workertest.html 
                  
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Shazron Abdullah
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest.html
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Magnus updated CB-1406:
------------------------------

    Attachment: index.html

The index.html is a sample for a Xcode project which requires Cordova 2.1.0 and the ChildBrowser Plugin installed.
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: index.html, testworker.js, workertest.html
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah resolved CB-1406.
----------------------------------

    Resolution: Not A Problem

External issue.
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.3.0
>
>         Attachments: testworker.js, workertest2.tar.bz2, workertest.html, workertest-native.zip, xhr_tests.png
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Magnus updated CB-1406:
------------------------------

    Attachment: xhr_tests.png

The screenshot shows the difference between direct XHR-access (left) and access via a web worker.
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest2.tar.bz2, workertest.html, xhr_tests.png
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507798#comment-13507798 ] 

Shazron Abdullah commented on CB-1406:
--------------------------------------

I am unsure how to proceed with this -- I tried your test case and commented out the cordova.js, and it still fails, which rules out it being a Cordova specific issue, and thus it seems it's a plain UIWebView issue (the SOP as you have found).
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.3.0
>
>         Attachments: testworker.js, workertest2.tar.bz2, workertest.html, xhr_tests.png
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Magnus updated CB-1406:
------------------------------

    Attachment: workertest.html
                testworker.js

Pure HTML/JS test case
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Shazron Abdullah
>              Labels: HTTP, WebWorker, XHR
>         Attachments: testworker.js, workertest.html
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13463664#comment-13463664 ] 

Jochen Magnus commented on CB-1406:
-----------------------------------

Michal,

you wrote: "...this just being a bug in ios6 webview."

Does that mean that we have no chance to fix the issue in Cordova and shall I report it to Apple  - or shall we still wait for a fix in Cordova?

Thanks!

jo

                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest.html
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-1406:
---------------------------------

    Fix Version/s:     (was: 2.2.0)
                   2.3.0

Punt to 2.3.0
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.3.0
>
>         Attachments: testworker.js, workertest2.tar.bz2, workertest.html, xhr_tests.png
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453329#comment-13453329 ] 

Jochen Magnus commented on CB-1406:
-----------------------------------

Michal,
probably you got the status 0 result due to XHR's same origin policy. The source file and the test.txt file, which my examples try to load, must have the same server origin. 

I had tested exactely that the status 0 problem I described, is *not* a result of the same origin policy. The webapp example is working either with iOS 5 or iOS 6. The native version, using Cordova 2.1rc2, is working only with iOS 5. 

You can call my working example from http://live.rhein-zeitung.de/workertest.html 
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Shazron Abdullah
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest.html
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Magnus updated CB-1406:
------------------------------

    Attachment:     (was: workertest.tar.bz2)
    
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest2.tar.bz2, workertest.html, xhr_tests.png
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Magnus updated CB-1406:
------------------------------

    Description: 
HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 

This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.

The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 

A Xcode test project is available. 

  was:
HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.

The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 



    
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Shazron Abdullah
>              Labels: HTTP, WebWorker, XHR
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454436#comment-13454436 ] 

Jochen Magnus commented on CB-1406:
-----------------------------------

The problem still exists in the iOS6 GM.
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Shazron Abdullah
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest.html
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466193#comment-13466193 ] 

Jochen Magnus commented on CB-1406:
-----------------------------------

I made some further tests and found that the problem with XHR requests in webworkers in a native app is caused by the Same Origin Policy (SOP). This only happens with iOS 6 not with iOS 5. 

With the remote debugger which is newly available in Safari 6 for iOS 6 apps the console shows: "XMLHttpRequest cannot load http://live.rhein-zeitung.de/test.txt. Origin file:// is not allowed by Access-Control-Allow-Origin."

I enhanced my test case so it could now load alternatively by XHR in the main applications thread or by XHR via webworker. No problem occurs in the first case, but the SOP security issue happens in the second case, because there is "Origin" HTTP header field witch contains "file://" (in the first case, there seems to be no such header field).

A workaround is to allow Cross Domain Scripting in the webservers config (for Apache webserver add "Header add Access-Control-Allow-Origin *" to the config), but this may be a security problem. I tested it, but I am unsure about the security issue when allowing '*' or 'file://'.
 So I would prefer a "real" solution.

                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest2.tar.bz2, workertest.html, workertest.tar.bz2
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Magnus updated CB-1406:
------------------------------

    Description: 
HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.

The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 



  was:
HTTP Requests in Web Workers are working well under iOS 5 and 6 Beta in Web Apps (HTML5 apps), but not in a native app using Cordova in iOS 6 (Beta 4).

HTTPRequests in the Web Workers ending always with http.readyState==4  (that's ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.

    
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Shazron Abdullah
>              Labels: HTTP, WebWorker, XHR
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Magnus updated CB-1406:
------------------------------

    Comment: was deleted

(was: The index.html is a sample for a Xcode project which requires Cordova 2.1.0 and the ChildBrowser Plugin installed.)
    
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest.html
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Magnus updated CB-1406:
------------------------------

    Attachment: workertest.tar.bz2

Michal, I would love to help, but unfortunately I have not the slightest idea where I should look.

I attach my test case as Xcode project. It runs well in iOS 5.x and is silly in iOS 6.

                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest.html, workertest.tar.bz2
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Jochen Magnus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Magnus updated CB-1406:
------------------------------

    Attachment: workertest2.tar.bz2
    
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest2.tar.bz2, workertest.html, workertest.tar.bz2
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1406) HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)

Posted by "Michal Mocny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13463794#comment-13463794 ] 

Michal Mocny commented on CB-1406:
----------------------------------

Jochen, the opposite.  After you pointed out the same origin policy issue I was actually running into, I verified that the example works fine outside of cordova apps.  Truth be told I haven't been looking into this at all since I was just trying to verify and I'm not sure how widespread the issue is.  If I have some spare cycles I'll take another look but if you or anyone would like to do some digging, by all means!
                
> HTTP-Get via XHR in Web Workers always return status 0 under iOS 6 (Beta 4)
> ---------------------------------------------------------------------------
>
>                 Key: CB-1406
>                 URL: https://issues.apache.org/jira/browse/CB-1406
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: all iOS devices and simulators
>            Reporter: Jochen Magnus
>            Assignee: Michal Mocny
>              Labels: HTTP, WebWorker, XHR
>             Fix For: 2.2.0
>
>         Attachments: testworker.js, workertest.html
>
>
> HTTPRequests in the Web Workers ending always with http.readyState==4  (that's the ready state) but with http.status==0, which is an undefined status (normal is 200 for "o.k."). The file is requested from and fully deliverd by the webserver. 
> This happens under iOS 6 Beta 4 but not under iOS 5.x where the same app with the same Cordova version works well.
> The problem did not occur with XHR in the native programs main thread nor in non-native HTML5-apps (WebApps without the use of Cordova). 
> A Xcode test project is available. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira