Moved +shouldAutomaticallyMapHEADToGET to GCDWebServer class

This commit is contained in:
Pierre-Olivier Latour
2014-04-09 13:53:46 -07:00
parent d383845fcc
commit fcea9cad44
4 changed files with 6 additions and 6 deletions
+1 -5
View File
@@ -535,7 +535,7 @@ static inline NSUInteger _ScanHexNumber(const void* bytes, NSUInteger size) {
if (extraData) {
NSString* requestMethod = ARC_BRIDGE_RELEASE(CFHTTPMessageCopyRequestMethod(_requestMessage)); // Method verbs are case-sensitive and uppercase
DCHECK(requestMethod);
if ([[self class] shouldAutomaticallyMapHEADToGET] && [requestMethod isEqualToString:@"HEAD"]) {
if ([[_server class] shouldAutomaticallyMapHEADToGET] && [requestMethod isEqualToString:@"HEAD"]) {
requestMethod = @"GET";
_virtualHEAD = YES;
}
@@ -662,10 +662,6 @@ static NSString* _StringFromAddressData(NSData* data) {
@implementation GCDWebServerConnection (Subclassing)
+ (BOOL)shouldAutomaticallyMapHEADToGET {
return YES;
}
- (void)open {
LOG_DEBUG(@"Did open connection on socket %i", _socket);
[self _readRequestHeaders];