httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 59829] Detect HTTPS marker from reverse proxy
Date Thu, 02 Feb 2017 11:24:50 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=59829

coladict@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #34024|0                           |1
        is obsolete|                            |
  Attachment #34249|0                           |1
        is obsolete|                            |

--- Comment #16 from coladict@gmail.com ---
Created attachment 34709
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34709&action=edit
Updated patch that sets SERVER_PORT and REQUEST_SCHEME

Since you correctly voiced concerns about the SERVER_PORT, I took another shot
at it, and discovered that setting it in the environment doesn't work. The
correct way was to register call ap_hook_http_scheme and ap_hook_default_port
to register overrides. Both hook functions assume are written under the
assumption you're not using mod_ssl, because you're behind a proxy.

Patch is tested on trunk 2.5 version from about 20 hours ago. Testing via
phpinfo() gives these values when NOT using HTTPS:
SERVER_PORT     80 
REQUEST_SCHEME  http 
With HTTPS not being set, while calling it through a HTTPS request gives:
HTTPS   on 
SERVER_PORT     443 
REQUEST_SCHEME  https

When I configured `SecureIndicatorSSLPort 5512` in httpd.conf, the
`SERVER_PORT` changed accordingly.

I haven't added checks for the validity of the parsed SecureIndicatorSSLPort
value, but otherwise it seems complete.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message