You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In download_pac, when an error occurs during an HTTP request, the error is ignored, and the next URL is attempted. At the end, if all URLs failed with error, the function returns None. It can be implied from this function that an error has occurred. If the list of URLs contained at least one URL, it should be expected that a response is available. However, it cannot be implied from get_pac, as perhaps PAC is not configured at all. Hence, either:
get_pac raises an error if PAC is not configured (This way the user can imply whether to expect a PAC)
get_pac evaluates if a PAC script was expected and raises an error otherwise
download_pac collects all the errors that occured, and chooses one to raise
download_pac collects all the errors and throws a new error type that contains the list of errors that occurred. (Leave it up to the user to figure out what error he cares about)
The text was updated successfully, but these errors were encountered:
Today, I found there is a registry value from which one can infer what are the available proxy modes. Given this value, it could be evaluated whether the WPAD or the PAC URL should be evaluated at all. In case that they did, then one should expect one, hence failing of those request would deserve to be an exception:
That stackoverflow post is a very good find. But I am not sure about the idea of get_pac() being changed to raise errors by default, due to compatibility. The original idea was that missing PAC should not raise an error because the operating system doesn't do it either.
In download_pac, when an error occurs during an HTTP request, the error is ignored, and the next URL is attempted. At the end, if all URLs failed with error, the function returns None. It can be implied from this function that an error has occurred. If the list of URLs contained at least one URL, it should be expected that a response is available. However, it cannot be implied from get_pac, as perhaps PAC is not configured at all. Hence, either:
The text was updated successfully, but these errors were encountered: