Sometimes Cookies are not set even after you assign all http headers. it is better to create mutable request and copy your nsurlrequest and add your custom header to it so that all information from original request is retained in mutable one.
-(BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
{if(check if key not present){NSMutableURLRequest*re =[[NSMutableURLRequest alloc] init];//alloc init not required
re =(NSMutableURLRequest*) request.mutableCopy;[re setValue:@"Your Custom Value" forHTTPHeaderField:@"Yout Custom Header"];[webView loadRequest:re];return NO;}return YES;}