Skip to content
Snippets Groups Projects
Commit 42760751 authored by George Nachman's avatar George Nachman
Browse files

Do case-insensitive comparisons of websocket headers.

parent 3cea1df0
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -50,7 +50,7 @@ typedef NS_ENUM(NSUInteger, iTermWebSocketConnectionState) {
@"sec-websocket-protocol": kProtocolName,
};
for (NSString *key in requiredValues) {
if (![headers[key] isEqualToString:requiredValues[key]]) {
if ([headers[key] caseInsensitiveCompare:requiredValues[key]] != NSOrderedSame) {
DLog(@"Header %@ has value <%@> but I require <%@>", key, headers[key], requiredValues[key]);
return NO;
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment