Bug 57933 - apr_port_t returns constant
Summary: apr_port_t returns constant
Status: NEEDINFO
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.4.12
Hardware: PC Linux
: P2 minor (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-18 21:16 UTC by arunas.u
Modified: 2018-08-02 19:20 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.