@@ -376,11 +376,11 @@ * request before redirection. This also means stripping * the entity of the request. */ if (_status == 303) { OFEnumerator *keyEnumerator, *objectEnumerator; - id key, object; + OFString *key, *object; keyEnumerator = [headers keyEnumerator]; objectEnumerator = [headers objectEnumerator]; while ((key = [keyEnumerator nextObject]) != nil && @@ -607,19 +607,17 @@ * the entire request (e.g. in case a keep-alive connection timed out). */ @try { OFString *requestString = constructRequestString(_request); - const char *UTF8String = [requestString UTF8String]; - size_t UTF8StringLength = [requestString UTF8StringLength]; /* * Pass requestString as context to retain it so that the * underlying buffer lives long enough. */ - [sock asyncWriteBuffer: UTF8String - length: UTF8StringLength + [sock asyncWriteBuffer: [requestString UTF8String] + length: [requestString UTF8StringLength] target: self selector: @selector(socket:didWriteRequest: length:context:exception:) context: requestString]; } @catch (id e) {