@@ -74,13 +74,13 @@ @public OFStreamSocket *_socket; OFHTTPServer *_server; OFTimer *_timer; enum { - AWAITING_PROLOG, - PARSING_HEADERS, - SEND_RESPONSE + StateAwaitingProlog, + StateParsingHeaders, + StateSendResponse } _state; uint8_t _HTTPMinorVersion; OFHTTPRequestMethod _method; OFString *_host, *_path; uint16_t _port; @@ -294,11 +294,11 @@ scheduledTimerWithTimeInterval: 10 target: _socket selector: @selector( cancelAsyncRequests) repeats: false] retain]; - _state = AWAITING_PROLOG; + _state = StateAwaitingProlog; } @catch (id e) { [self release]; @throw e; } @@ -328,13 +328,13 @@ if (line == nil || exception != nil) return false; @try { switch (_state) { - case AWAITING_PROLOG: + case StateAwaitingProlog: return [self parseProlog: line]; - case PARSING_HEADERS: + case StateParsingHeaders: return [self parseHeaders: line]; default: return false; } } @catch (OFWriteFailedException *e) { @@ -393,11 +393,11 @@ if (![path hasPrefix: @"/"]) return [self sendErrorAndClose: 400]; _headers = [[OFMutableDictionary alloc] init]; _path = [path copy]; - _state = PARSING_HEADERS; + _state = StateParsingHeaders; return true; } - (bool)parseHeaders: (OFString *)line @@ -435,11 +435,11 @@ [_timer invalidate]; [_timer release]; _timer = nil; } - _state = SEND_RESPONSE; + _state = StateSendResponse; [self createResponse]; return false; }