WKWebView Post Request Bug?

Originator:murata
Number:rdar://20304207 Date Originated:26-Mar-2015 12:09 PM
Status:Open Resolved:
Product:OS X SDK Product Version:
Classification: Reproducible:
 
Summary:
When I POST request with WKWebView, http of body data are missing.

Steps to Reproduce:
1. Run the following processing:
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://XXXX.php"]];
NSString *idPass = [NSString stringWithFormat:@"username=%@&pass=%@",@"XXXX", @"XXXX"];
NSData *data = [idPass dataUsingEncoding:NSUTF8StringEncoding];
[request setHTTPBody:data];
[request setHTTPMethod:@"POST"];
[webView loadRequest:request];

2. The following delegate is called:
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler;

At this time,
HTTPBody is nil in the request property of navigationAction.


Expected Results:
Page of login error is displayed.
※Of course, the login information is correct.

Actual Results:
Login successful page is displayed.

Version:
Mac OS X 10.10.2
X-code 6.2(6C131e)

Notes:
In this matter, my usage of WkWebView is correct?

Configuration:
PC : MacBook Pro (Retina, 13-inch, Late 2013)
OS : Mac OS X 10.10.2

Attachments:

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!