Noticed this today - while one can get SSL support by supplying an Agent, the separation causes issues with automatic redirects: if an HTTPS URL redirects to HTTP, or conversely if an HTTP request redirects to HTTPS, the automatic redirect will cause an error. Until SSL is fully supported, it may be helpful to have an "ssllAgent" option or the like for the options object for requests and sessions - it could then select which agent to use depending on the protocol of the URL in the redirect chain.
This would also remove the need to supply the agent for individual requests in a session.
Hi!
Noticed this today - while one can get SSL support by supplying an Agent, the separation causes issues with automatic redirects: if an
HTTPS
URL redirects toHTTP
, or conversely if an HTTP request redirects to HTTPS, the automatic redirect will cause an error. Until SSL is fully supported, it may be helpful to have an "ssllAgent" option or the like for the options object for requests and sessions - it could then select which agent to use depending on the protocol of the URL in the redirect chain.This would also remove the need to supply the agent for individual requests in a session.