Bug 57933

Summary: apr_port_t returns constant
Product: Apache httpd-2 Reporter: arunas.u
Component: CoreAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED CLOSED    
Severity: minor    
Priority: P2    
Version: 2.4.12   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description arunas.u 2015-05-18 21:16:50 UTC
Today i was struggling with misbehaviour of mod_rewrite SERVER_PORT on non default apache2 port.
I found that, in both newest legacy and current versions, modules/http/http_core.c there is a function apr_port_t that return either 80 or 443, based on ssl configuration. Shouldn't this function return current used port?
Comment 1 Christophe JAILLET 2018-08-02 19:20:59 UTC
I guess you talk about:
   apr_port_t http_port(const request_rec *r)

if correct, then the answer is no. This function is there to give the default http or https port number (i.e. 443 or 80)

If you are not talking about this function, then you should provide additional description in order to help us check if there is an issue or not.