Hello !
I'm using an NSMutableURLRequest to launch a [NSURLConnection connectionWithRequest: delegate:] request. Before opening the connexion, I try to set all the HTTP header fields as follows, but the Connection: close is always transformed into a 'keep-alive' connection (as I verified with tcpdump). Is there anything I should do for it to work ?
[trackerRequestNSURL setAllHTTPHeaderFields: [NSDictionary dictionaryWithObjectsAndKeys: @"BitsOnWheels1.0PR1.5b1", @"User-Agent", @"close", @"Connection", @"gzip", @"Accept-Encoding", @"*/*", @"Accept", _realHost, @"Host", nil] ];
PS as a side question : do I have to set the Host: field myself in this case, or will it be filled by cocoa ?
thanks !
|