Xcode6-Beta4 (6A267n): WKWebView custom User-Agent failure
| Originator: | jjdickow | ||
| Number: | rdar://17773114 | Date Originated: | 22-Jul-2014 09:34 PM |
| Status: | Open | Resolved: | |
| Product: | Mac OSX SDK | Product Version: | |
| Classification: | Reproducible: | Yes |
Summary:
Setting the “User-Agent” header field for a WKWebView does not result in a change in the received User-Agent header field on the server side
Steps to Reproduce:
I’m using the following code:
static NSString *const userAgentString = @“blablabla”;
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setValue:userAgentString forHTTPHeaderField:@"User-Agent"];
[self.webView loadRequest:request];
Expected Results:
When I execute the request, the receiver (server) should see the proper User-Agent header field
Actual Results:
The User-Agent header field is always “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/538.46 (KHTML, like Gecko)”
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!