If an auto-config .pac file specifies a SOCKS proxy, or has a typo,
or a manually configured proxy has no values, or any other case where
we end up with no available proxies, we should fall back to using a
direct connection.
In addition, within the connectToOrigin code in SPDYSocket, if the
connection fails on the first call (using a manually configured proxy
or something invalid happens setting up the streams), then it's
important to return NO to the session. Since the delegate hasn't been
set yet in the session, always returning YES could result in a zombie
session being inserted into the pool and remaining there indefinitely.
More unit tests for endpoint manager and socket, and some refactoring.
Fixed some test logic.
Coverage decreased (-2.36%) to 61.09% when pulling d9ef3ae5cf5bf026d0f73a4bbe24c7a696533b44 on kgoodier:fix/proxy-simple into 276f81f63bfa02f46506fcdd9881d11c1745e532 on twitter:develop.
If an auto-config .pac file specifies a SOCKS proxy, or has a typo, or a manually configured proxy has no values, or any other case where we end up with no available proxies, we should fall back to using a direct connection.
In addition, within the connectToOrigin code in SPDYSocket, if the connection fails on the first call (using a manually configured proxy or something invalid happens setting up the streams), then it's important to return NO to the session. Since the delegate hasn't been set yet in the session, always returning YES could result in a zombie session being inserted into the pool and remaining there indefinitely.
More unit tests for endpoint manager and socket, and some refactoring. Fixed some test logic.