“Stream is sending an event before being opened”

前端 未结 2 592
臣服心动
臣服心动 2020-12-14 01:59

I\'m trying to make a SOAP request with Swift. Running the latest Xcode/iOS as of 9/9/14. I use an NSMutableURLRequest that I add an HTTPBody to with the reques

相关标签:
2条回答
  • 2020-12-14 02:36

    I searched everywhere for this problem and ultimately I was passing the wrong credentials at didReceiveAuthenticationChallenge :(

    Check if you are accidentally doing the same too

    If that doesn't work try this:

    Embed your credentials in the url string

    NSString *urlString = @"http://username:password@domain.com/home";
    [webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlString]]];
    
    0 讨论(0)
  • 2020-12-14 02:53

    The issue with Stream not Open seems to be directly i CFNetwork implementation. (reproducible when using NSConnection and also NSSession). It occurs for requests (responses) that needs to be chunked. A side-effect of this issue is that windows authentication is not working properly and each request needs to go through complete handshaking process. And it is not fixed also in iOS 8.1.

    0 讨论(0)
提交回复
热议问题