@@ -25,10 +25,11 @@ #import "OFHTTPRequest.h" #import "OFString.h" #import "OFThread.h" #import "OFTCPSocket.h" #import "OFURL.h" +#import "OFDictionary.h" #import "OFAutoreleasePool.h" #import "TestsAppDelegate.h" static OFString *module = @"OFHTTPRequest"; @@ -70,11 +71,11 @@ if (![[client readLine] isEqual: @""]) assert(0); [client writeString: @"HTTP/1.0 200 OK\r\n" - @"Content-Length: 7\r\n" + @"cONTeNT-lENgTH: 7\r\n" @"\r\n" @"foo\n" @"bar"]; [client close]; @@ -106,10 +107,13 @@ TEST(@"+[requestWithURL]", (req = [OFHTTPRequest requestWithURL: url])) TEST(@"-[perform]", (res = [req perform])) + TEST(@"Normalization of server header keys", + ([[res headers] objectForKey: @"Content-Length"] != nil)) + [server join]; [pool drain]; } @end