1. #1
    Sencha User firekesti's Avatar
    Join Date
    Sep 2012
    Posts
    22
    Vote Rating
    1
    Answers
    2
    firekesti is on a distinguished road

      0  

    Default Unanswered: Switching from HTTP to HTTPS fails in Connection.js

    Unanswered: Switching from HTTP to HTTPS fails in Connection.js


    I'm overriding the Rest Proxy's buildUrl method like this:
    Code:
    request.setUrl("http://" + serverUrl + ":8080/restapi/2.0" + url);
    This worked perfectly, but I needed to add support for SSL, so I changed it to this:
    Code:
    request.setUrl("https://" + serverUrl + "/restapi/2.0" + url);
    Performing this request outside of Sencha works great, but when I try to load it in my app (using Chromium with --disable-web-security), I get a strange error:
    "GET https://10.0.87.97/restapi/2.0/entry-type Connection.js:314"
    There's no sign of a response code, it's just failing at that line. I looked it up,
    Code:
                // start the request!
                xhr.send(requestOptions.data);
    When I debugged through that line it looked like requestOptions.data was null. Why would this be happening?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,581
    Vote Rating
    433
    Answers
    3100
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    The data comes from the rawData, xmlData or jsonData in the request config you send. If it's not a GET, the data will also come from any params you specified in the request config so it may be null and should be valid.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    10
    Vote Rating
    0
    Answers
    1
    dbabyak is on a distinguished road

      0  

    Default Similar error

    Similar error


    I am getting a similar error with Connection.js at line 314 ('Resource failed to load') , while sending requests over HTTPS.
    How to overcome it?

    Thanks

Tags for this Thread