Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SignalR sending connect to wrong method. #165

Open
kkocabiyik opened this issue Apr 7, 2014 · 0 comments
Open

SignalR sending connect to wrong method. #165

kkocabiyik opened this issue Apr 7, 2014 · 0 comments
Labels
Milestone

Comments

@kkocabiyik
Copy link

What I have realized is that SignalR hub connection is trying to connect via wrong url. For instance it negotiates with http://domain.com/signalr/negotiate.. and after the negotiation it tries to connect via http://domain.com/signalr/signalr/connect?... in which the second signalr in query string should be omitted. I fixed it up by changing the "get url" method like below.

+ (NSString *)getUrl:(NSString *)URL useDefault:(BOOL)useDefault {
    if([URL hasSuffix:@"/"] == false) {
        URL = [URL stringByAppendingString:@"/"];
    }

    if(useDefault && [URL rangeOfString:@"signalr"].location == NSNotFound) {
        return [URL stringByAppendingString:@"signalr"];
    }

    return URL;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants