Results 1 to 7 of 7

Thread: Ext.Ajax.request response.status 0 but file is loaded

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Dec 2013
    Vote Rating

    Default Answered: Ext.Ajax.request response.status 0 but file is loaded

    Hey all :-)

    I try to load a file within base64 in ...

    PHP Code:
    //    binary: true,  // makes it more worse: no responseText in Output
    success: function(response) {
    cfg Ext.decode(response.responseText);
    loadSuccessHandler(cfg); // callback function given as param functioncall
    failure: function(response) {
    loadErrorHandler("Could not get "+this.configFileName+" - server response was " response.status); // this is 0
    console.log(response); // 
    Output on console:
    XHR finished loading: "file:///Users/noman/Documents/workspace/fassade/tests/app/config/config.cfg?_dc=1388973757477".
    Could not get undefined - server response was 0
    |> Object
    In my opinion I shouldn't see content in responseText like this (if failure sayes status=0):
    HTML Code:
    responseText: WW91IGFyZSBhIHNub29weSBFeHRKUyBIZXJvIDotKQ0KUGxlYXNlIGhlbHAgbWUgdG8gZmluZCBhIHNvbHV0aW9uICENCkkgdm90ZSB5b3UgdXAgYW5kIHNlbGVjdCB0aGUgYmVzdCBhbnN3ZXIgb2YgY2F1c2UgIQ0KSWYgeW91IHZvdGUgbWUgYWxzbyB1cCBJIHdpbGwgcG9zdCBteSBzb2x1dGlvbiBpZiB0aGVyZSBpcyBubyBzb2x1dGlvbiBwb3N0ZWQgYnkgb3RoZXJzLg==
    If I activate the flag binary: true I will loose my responseText in Object (console.log .. see above)

    For this: Everything does the opposite thinks than I expected !!!

  2. This will only happen loading files directly off the filesystem. If you put this through a server it'll work fine.

    See the code for the parseStatus method of A code of 0 is treated as an error. This is not straightforward as 0 could mean success or failure and applies when a real status code is not available.

    If you really must work directly off the filesystem then you can override the relevant parts of Connection easily enough.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts