From: Bradley Nicholes Date: Mon, 9 Dec 2002 17:23:58 +0000 (+0000) Subject: Implemented ap_os_default_port() to allow NetWare to resolve the correct X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1def53888351df24e93ce49854523a5c81c6dcf1;p=thirdparty%2Fapache%2Fhttpd.git Implemented ap_os_default_port() to allow NetWare to resolve the correct default port based on the request method. This fixes a problem with URL reconstruction on a redirect. Submitted by: Pavel Novy (novy@feld.cvut.cz) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@97821 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/CHANGES b/src/CHANGES index 6d561273bf3..e795f8000de 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -1,5 +1,10 @@ Changes with Apache 1.3.28 + *) NetWare: implemented ap_os_default_port() to resolve the + correct default port based on the request method. This fixes + a URL reconstruction problem on a redirect. + [Pavel Novy (novy@feld.cvut.cz)] + *) Added new ap_register_cleanup_ex() API function which allows for a "magic" cleanup function to be run at register time rather than at cleanup time. Also added the diff --git a/src/include/httpd.h b/src/include/httpd.h index 4815ece0726..9a5ffc707d1 100644 --- a/src/include/httpd.h +++ b/src/include/httpd.h @@ -142,11 +142,12 @@ extern "C" { #define DEFAULT_HTTPS_PORT 443 #define ap_is_default_port(port,r) ((port) == ap_default_port(r)) #ifdef NETWARE -#define ap_http_method(r) ap_os_http_method(r) +#define ap_http_method(r) ap_os_http_method((void*)r) +#define ap_default_port(r) ap_os_default_port((void*)r) #else #define ap_http_method(r) "http" -#endif #define ap_default_port(r) DEFAULT_HTTP_PORT +#endif /* --------- Default user name and group name running standalone ---------- */ /* --- These may be specified as numbers by placing a # before a number --- */ diff --git a/src/os/netware/ApacheCore.imp b/src/os/netware/ApacheCore.imp index 2e70a60aa90..8906c650fc5 100644 --- a/src/os/netware/ApacheCore.imp +++ b/src/os/netware/ApacheCore.imp @@ -362,6 +362,7 @@ ap_os_canonical_filename, ap_os_case_canonical_filename, ap_os_http_method, + ap_os_default_port, os_readdir, os_opendir, os_closedir, diff --git a/src/os/netware/os.c b/src/os/netware/os.c index bae4b0dc278..054d9793dfd 100644 --- a/src/os/netware/os.c +++ b/src/os/netware/os.c @@ -502,3 +502,8 @@ char *ap_os_http_method(void *r) if (optParam & (SO_SSL_ENABLE | SO_SSL_SERVER)) return "https"; return "http"; } + +unsigned short ap_os_default_port(void *r) +{ + return ap_default_port_for_scheme(ap_os_http_method(r)); +} diff --git a/src/os/netware/os.h b/src/os/netware/os.h index be95fe7b12e..7b0c4635932 100644 --- a/src/os/netware/os.h +++ b/src/os/netware/os.h @@ -186,5 +186,6 @@ char *bslash2slash(char*); void init_name_space(void); int ap_os_is_filename_valid(const char *file); char *ap_os_http_method(void *r); +unsigned short ap_os_default_port(void *r); #endif /*! APACHE_OS_H*/