Error -1017 invoking CFNetworkExecuteProxyAutoConfigurationURL when Transfer-Encoding is sent instead of Content-Length

Hi. We are invoking CFNetworkExecuteProxyAutoConfigurationURL (https://developer.apple.com/documentation/cfnetwork/1426392-cfnetworkexecuteproxyautoconfigu?language=objc) to download and apply automatic proxy configuration. It is working OK for most of cases but an error -1017 is retrieved when the pac file response contains the header Transfer-Encoding -Transfer-Encoding: chunked- instead of Content-Length (If Content-Length there is no any problem) Do you know if there is some parameter to configure to allow to support Transfer-Encoding in CFNetworkExecuteProxyAutoConfigurationURL? I didn't find any documentation explaining how to do this or if this a limitation on the API. Regards

There isn't a proxy setting that would allow you to configure response types in CFNetwork, just to configure and setup the proxy itself. I would recommend talking to the server side folks about the usage of chunked vs fixed length responses in the Content Length header as this should be something that you can work with them on.

Error -1017 invoking CFNetworkExecuteProxyAutoConfigurationURL when Transfer-Encoding is sent instead of Content-Length
 
 
Q