Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions WLRemoteLink.j
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,17 @@ var WLRemoteActionSerial = 1;
return NO;
}

- (void)setStatusCode:(int)anInt
{
[self willChangeValueForKey:@"statusCode"];

// IE 8 and 9 can not handle HTTP responses with status code 204 (No Content) properly.
// Code 1223 will be used instead. If this happens, we can safely map it to 204.
statusCode = (anInt == 1223) ? 204 : anInt;

[self didChangeValueForKey:@"statusCode"];
}

/*!
Reset the action so that it can be retried. This message is sent after an action fails due to
a network or a server error and will need to be performed a second time.
Expand Down Expand Up @@ -738,8 +749,8 @@ var WLRemoteActionSerial = 1;
{
var code = [aResponse statusCode];
[self setStatusCode:code];
if (code < 200 || code > 299)
CPLog.error("Received error code %d.", code);
if (statusCode < 200 || statusCode > 299)
CPLog.error("Received error code %d.", statusCode);
}
}

Expand Down