Files
react-native/Libraries/Network
malacca c0834b884b fix RCTNetworking contentType issue (#35640)
Summary:
https://github.com/facebook/react-native/blob/96027f787ade1a465569975059426d2c03ee5ad0/Libraries/Network/RCTNetworking.mm#L418

because  `RCTNullIfNil(response.MIMEType)`,  `contentType` may be `[NSNull null]`

https://github.com/facebook/react-native/blob/96027f787ade1a465569975059426d2c03ee5ad0/Libraries/Network/RCTNetworking.mm#L114

Here only check `partContentType` is not nil, This causes the custom type never used

https://github.com/facebook/react-native/blob/96027f787ade1a465569975059426d2c03ee5ad0/Libraries/Network/RCTNetworking.mm#L334

more serious here, if `dataContentType` is `[NSNull null]` ,  it will crash the application

`-[NSNull hasPrefix:]: unrecognized selector sent to instance 0x7fff8004b700`

## Changelog

[iOS] [Fixed] - fix dataContentType may be [NSNull null] issue

Pull Request resolved: https://github.com/facebook/react-native/pull/35640

Reviewed By: cipolleschi

Differential Revision: D42067206

Pulled By: dmytrorykun

fbshipit-source-id: 073e6589111f5117486b69b8206a07ef1995c5b8
2022-12-15 08:14:38 -08:00
..
2022-09-30 14:28:48 -07:00