Replace absolute_uri with absolute_path when HTTP request is forwarded to non-proxy server.
According to the spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html):
When Request-URI is used to identify a resource on an origin server or
gateway, the absolute path of the URI MUST be transmitted as the
Request-URI.
Before the change,the proxy sent absolute_uri, which is used to send
HTTP requests to proxies: “The absoluteURI form is REQUIRED when the
request is being made to a proxy.”
Related Bug 18776631
Other changes:
1. Remove proxy-connection header when the request is sent to an
origin server.
2. Added “connection = close” header to indicate that the origin
server needs to close the connection right after the response.
Currently, our proxy does not support keep-alive (persistent)
connections because it analyses only the first request for a given
connection and; therefore, cannot perform required request content
substitutions.
3. Fixed an issue when a non-numeric host port number resulted in
forwarding requests to default 443 port for SSL connections, e.g.
request to https://google.com:ZZZ, would be translated to
https://google.com:443.
4. Fixed an issue when the proxy tries to establish direct connection
to the origin server even when it is not supposed to do that
according to PAC. That happened when PAC returned a proxy server
that is not available.
5. Prevent ProxyServer from crashing when PacService throws
an exception by intercepting all exception types.
Change-Id: I7d50b13b4cb24199a690a53c1925e87c15a8d45b
1 file changed