summaryrefslogtreecommitdiff
path: root/modules/proxy
diff options
context:
space:
mode:
Diffstat (limited to 'modules/proxy')
-rw-r--r--modules/proxy/balancers/mod_lbmethod_heartbeat.c2
-rw-r--r--modules/proxy/mod_proxy.c8
-rw-r--r--modules/proxy/mod_proxy.h5
-rw-r--r--modules/proxy/mod_proxy_ajp.c12
-rw-r--r--modules/proxy/mod_proxy_balancer.c4
-rw-r--r--modules/proxy/mod_proxy_hcheck.c17
-rw-r--r--modules/proxy/mod_proxy_http.c2
-rw-r--r--modules/proxy/mod_proxy_uwsgi.dep75
-rw-r--r--modules/proxy/mod_proxy_uwsgi.mak380
-rw-r--r--modules/proxy/proxy_util.c44
10 files changed, 507 insertions, 42 deletions
diff --git a/modules/proxy/balancers/mod_lbmethod_heartbeat.c b/modules/proxy/balancers/mod_lbmethod_heartbeat.c
index 640bddb7f7..d7462608a4 100644
--- a/modules/proxy/balancers/mod_lbmethod_heartbeat.c
+++ b/modules/proxy/balancers/mod_lbmethod_heartbeat.c
@@ -300,7 +300,7 @@ static proxy_worker *find_best_hb(proxy_balancer *balancer,
for (i = 0; i < balancer->workers->nelts; i++) {
worker = &APR_ARRAY_IDX(balancer->workers, i, proxy_worker *);
- server = apr_hash_get(servers, (*worker)->s->hostname, APR_HASH_KEY_STRING);
+ server = apr_hash_get(servers, (*worker)->s->hostname_ex, APR_HASH_KEY_STRING);
if (!server) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(01214)
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
index 009b375eae..e00a82dffa 100644
--- a/modules/proxy/mod_proxy.c
+++ b/modules/proxy/mod_proxy.c
@@ -2838,7 +2838,7 @@ static int proxy_status_hook(request_rec *r, int flags)
char fbuf[50];
if (!(flags & AP_STATUS_SHORT)) {
ap_rvputs(r, "<tr>\n<td>", (*worker)->s->scheme, "</td>", NULL);
- ap_rvputs(r, "<td>", (*worker)->s->hostname, "</td><td>", NULL);
+ ap_rvputs(r, "<td>", (*worker)->s->hostname_ex, "</td><td>", NULL);
ap_rvputs(r, ap_proxy_parse_wstatus(r->pool, *worker), NULL);
ap_rvputs(r, "</td><td>", (*worker)->s->route, NULL);
ap_rvputs(r, "</td><td>", (*worker)->s->redirect, NULL);
@@ -2930,7 +2930,8 @@ static void child_init(apr_pool_t *p, server_rec *s)
ap_proxy_define_worker(p, &forward, NULL, NULL, "http://www.apache.org", 0);
conf->forward = forward;
PROXY_STRNCPY(conf->forward->s->name, "proxy:forward");
- PROXY_STRNCPY(conf->forward->s->hostname, "*");
+ PROXY_STRNCPY(conf->forward->s->hostname, "*"); /* for compatibility */
+ PROXY_STRNCPY(conf->forward->s->hostname_ex, "*");
PROXY_STRNCPY(conf->forward->s->scheme, "*");
conf->forward->hash.def = conf->forward->s->hash.def =
ap_proxy_hashfunc(conf->forward->s->name, PROXY_HASHFUNC_DEFAULT);
@@ -2947,7 +2948,8 @@ static void child_init(apr_pool_t *p, server_rec *s)
if (!reverse) {
ap_proxy_define_worker(p, &reverse, NULL, NULL, "http://www.apache.org", 0);
PROXY_STRNCPY(reverse->s->name, "proxy:reverse");
- PROXY_STRNCPY(reverse->s->hostname, "*");
+ PROXY_STRNCPY(reverse->s->hostname, "*"); /* for compatibility */
+ PROXY_STRNCPY(reverse->s->hostname_ex, "*");
PROXY_STRNCPY(reverse->s->scheme, "*");
reverse->hash.def = reverse->s->hash.def =
ap_proxy_hashfunc(reverse->s->name, PROXY_HASHFUNC_DEFAULT);
diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h
index 7542fdc5ec..bfa5760204 100644
--- a/modules/proxy/mod_proxy.h
+++ b/modules/proxy/mod_proxy.h
@@ -354,6 +354,8 @@ PROXY_WORKER_HC_FAIL )
#define PROXY_BALANCER_MAX_HOSTNAME_SIZE PROXY_WORKER_MAX_HOSTNAME_SIZE
#define PROXY_BALANCER_MAX_STICKY_SIZE 64
+#define PROXY_RFC1035_HOSTNAME_SIZE 256
+
/* RFC-1035 mentions limits of 255 for host-names and 253 for domain-names,
* dotted together(?) this would fit the below size (+ trailing NUL).
*/
@@ -384,7 +386,7 @@ typedef struct {
typedef struct {
char name[PROXY_WORKER_MAX_NAME_SIZE];
char scheme[PROXY_WORKER_MAX_SCHEME_SIZE]; /* scheme to use ajp|http|https */
- char hostname[PROXY_WORKER_MAX_HOSTNAME_SIZE]; /* remote backend address */
+ char hostname[PROXY_WORKER_MAX_HOSTNAME_SIZE]; /* remote backend address (deprecated, use hostname_ex below) */
char route[PROXY_WORKER_MAX_ROUTE_SIZE]; /* balancing route */
char redirect[PROXY_WORKER_MAX_ROUTE_SIZE]; /* temporary balancing redirection route */
char flusher[PROXY_WORKER_MAX_SCHEME_SIZE]; /* flush provider used by mod_proxy_fdpass */
@@ -444,6 +446,7 @@ typedef struct {
hcmethod_t method; /* method to use for health check */
apr_interval_time_t interval;
char upgrade[PROXY_WORKER_MAX_SCHEME_SIZE];/* upgrade protocol used by mod_proxy_wstunnel */
+ char hostname_ex[PROXY_RFC1035_HOSTNAME_SIZE]; /* RFC1035 compliant version of the remote backend address */
} proxy_worker_shared;
#define ALIGNED_PROXY_WORKER_SHARED_SIZE (APR_ALIGN_DEFAULT(sizeof(proxy_worker_shared)))
diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c
index 051724e559..8669db6308 100644
--- a/modules/proxy/mod_proxy_ajp.c
+++ b/modules/proxy/mod_proxy_ajp.c
@@ -213,7 +213,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00868)
"request failed to %pI (%s)",
conn->worker->cp->addr,
- conn->worker->s->hostname);
+ conn->worker->s->hostname_ex);
if (status == AJP_EOVERFLOW)
return HTTP_BAD_REQUEST;
else if (status == AJP_EBAD_METHOD) {
@@ -297,7 +297,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00876)
"send failed to %pI (%s)",
conn->worker->cp->addr,
- conn->worker->s->hostname);
+ conn->worker->s->hostname_ex);
/*
* It is fatal when we failed to send a (part) of the request
* body.
@@ -337,7 +337,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00878)
"read response failed from %pI (%s)",
conn->worker->cp->addr,
- conn->worker->s->hostname);
+ conn->worker->s->hostname_ex);
/* If we had a successful cping/cpong and then a timeout
* we assume it is a request that cause a back-end timeout,
@@ -635,7 +635,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00892)
"got response from %pI (%s)",
conn->worker->cp->addr,
- conn->worker->s->hostname);
+ conn->worker->s->hostname_ex);
if (conf->error_override && ap_is_HTTP_ERROR(r->status)) {
/* clear r->status for override error, otherwise ErrorDocument
@@ -659,7 +659,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00893)
"dialog to %pI (%s) failed",
conn->worker->cp->addr,
- conn->worker->s->hostname);
+ conn->worker->s->hostname_ex);
/*
* If we already send data, signal a broken backend connection
* upwards in the chain.
@@ -794,7 +794,7 @@ static int proxy_ajp_handler(request_rec *r, proxy_worker *worker,
backend->close = 1;
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00897)
"cping/cpong failed to %pI (%s)",
- worker->cp->addr, worker->s->hostname);
+ worker->cp->addr, worker->s->hostname_ex);
status = HTTP_SERVICE_UNAVAILABLE;
retry++;
continue;
diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c
index f467535c22..9605dc04b8 100644
--- a/modules/proxy/mod_proxy_balancer.c
+++ b/modules/proxy/mod_proxy_balancer.c
@@ -452,7 +452,7 @@ static void force_recovery(proxy_balancer *balancer, server_rec *s)
(*worker)->s->status &= ~PROXY_WORKER_IN_ERROR;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01165)
"%s: Forcing recovery for worker (%s)",
- balancer->s->name, (*worker)->s->hostname);
+ balancer->s->name, (*worker)->s->hostname_ex);
}
}
}
@@ -1469,7 +1469,7 @@ static int balancer_handler(request_rec *r)
"</httpd:name>\n", NULL);
ap_rvputs(r, " <httpd:scheme>", worker->s->scheme,
"</httpd:scheme>\n", NULL);
- ap_rvputs(r, " <httpd:hostname>", worker->s->hostname,
+ ap_rvputs(r, " <httpd:hostname>", worker->s->hostname_ex,
"</httpd:hostname>\n", NULL);
ap_rprintf(r, " <httpd:loadfactor>%.2f</httpd:loadfactor>\n",
(float)(worker->s->lbfactor)/100.0);
diff --git a/modules/proxy/mod_proxy_hcheck.c b/modules/proxy/mod_proxy_hcheck.c
index 1b2833bf10..485fa74141 100644
--- a/modules/proxy/mod_proxy_hcheck.c
+++ b/modules/proxy/mod_proxy_hcheck.c
@@ -416,7 +416,7 @@ static void create_hcheck_req(wctx_t *wctx, proxy_worker *hc,
"OPTIONS * HTTP/1.0\r\n"
"Host: %s:%d\r\n"
"\r\n",
- hc->s->hostname, (int)hc->s->port);
+ hc->s->hostname_ex, (int)hc->s->port);
break;
case HEAD:
@@ -434,7 +434,7 @@ static void create_hcheck_req(wctx_t *wctx, proxy_worker *hc,
(wctx->path ? wctx->path : ""),
(wctx->path && *hc->s->hcuri ? "/" : "" ),
(*hc->s->hcuri ? hc->s->hcuri : ""),
- hc->s->hostname, (int)hc->s->port);
+ hc->s->hostname_ex, (int)hc->s->port);
break;
default:
@@ -461,12 +461,13 @@ static proxy_worker *hc_get_hcworker(sctx_t *ctx, proxy_worker *worker,
: ap_proxy_port_of_scheme(worker->s->scheme));
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ctx->s, APLOGNO(03248)
"Creating hc worker %pp for %s://%s:%d",
- worker, worker->s->scheme, worker->s->hostname,
+ worker, worker->s->scheme, worker->s->hostname_ex,
(int)port);
ap_proxy_define_worker(ctx->p, &hc, NULL, NULL, worker->s->name, 0);
apr_snprintf(hc->s->name, sizeof hc->s->name, "%pp", worker);
- PROXY_STRNCPY(hc->s->hostname, worker->s->hostname);
+ PROXY_STRNCPY(hc->s->hostname, worker->s->hostname); /* for compatibility */
+ PROXY_STRNCPY(hc->s->hostname_ex, worker->s->hostname_ex);
PROXY_STRNCPY(hc->s->scheme, worker->s->scheme);
PROXY_STRNCPY(hc->s->hcuri, worker->s->hcuri);
PROXY_STRNCPY(hc->s->hcexpr, worker->s->hcexpr);
@@ -498,7 +499,7 @@ static proxy_worker *hc_get_hcworker(sctx_t *ctx, proxy_worker *worker,
: ap_proxy_port_of_scheme(worker->s->scheme));
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ctx->s, APLOGNO(03311)
"Updating hc worker %pp for %s://%s:%d",
- worker, worker->s->scheme, worker->s->hostname,
+ worker, worker->s->scheme, worker->s->hostname_ex,
(int)port);
hc->s->method = worker->s->method;
create_hcheck_req(wctx, hc, ctx->p);
@@ -519,12 +520,12 @@ static int hc_determine_connection(sctx_t *ctx, proxy_worker *worker,
*addr = worker->cp->addr;
}
else {
- rv = apr_sockaddr_info_get(addr, worker->s->hostname,
+ rv = apr_sockaddr_info_get(addr, worker->s->hostname_ex,
APR_UNSPEC, worker->s->port, 0, p);
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ctx->s, APLOGNO(03249)
"DNS lookup failure for: %s:%d",
- worker->s->hostname, (int)worker->s->port);
+ worker->s->hostname_ex, (int)worker->s->port);
}
}
return (rv == APR_SUCCESS ? OK : !OK);
@@ -579,7 +580,7 @@ static int hc_get_backend(const char *proxy_function, proxy_conn_rec **backend,
status = ap_proxy_acquire_connection(proxy_function, backend, hc, ctx->s);
if (status == OK) {
(*backend)->addr = hc->cp->addr;
- (*backend)->hostname = hc->s->hostname;
+ (*backend)->hostname = hc->s->hostname_ex;
if (strcmp(hc->s->scheme, "https") == 0) {
if (!ap_proxy_ssl_enable(NULL)) {
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ctx->s, APLOGNO(03252)
diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c
index a5bfa77364..7377a118c5 100644
--- a/modules/proxy/mod_proxy_http.c
+++ b/modules/proxy/mod_proxy_http.c
@@ -1973,7 +1973,7 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
backend->close = 1;
ap_log_rerror(APLOG_MARK, APLOG_INFO, status, r, APLOGNO(01115)
"HTTP: 100-Continue failed to %pI (%s)",
- worker->cp->addr, worker->s->hostname);
+ worker->cp->addr, worker->s->hostname_ex);
retry++;
continue;
} else {
diff --git a/modules/proxy/mod_proxy_uwsgi.dep b/modules/proxy/mod_proxy_uwsgi.dep
new file mode 100644
index 0000000000..6513378895
--- /dev/null
+++ b/modules/proxy/mod_proxy_uwsgi.dep
@@ -0,0 +1,75 @@
+# Microsoft Developer Studio Generated Dependency File, included by mod_proxy_scgi.mak
+
+.\mod_proxy_uwsgi.c : \
+ "..\..\include\ap_config.h"\
+ "..\..\include\ap_config_layout.h"\
+ "..\..\include\ap_expr.h"\
+ "..\..\include\ap_hooks.h"\
+ "..\..\include\ap_mmn.h"\
+ "..\..\include\ap_provider.h"\
+ "..\..\include\ap_regex.h"\
+ "..\..\include\ap_release.h"\
+ "..\..\include\ap_slotmem.h"\
+ "..\..\include\apache_noprobes.h"\
+ "..\..\include\http_config.h"\
+ "..\..\include\http_connection.h"\
+ "..\..\include\http_core.h"\
+ "..\..\include\http_log.h"\
+ "..\..\include\http_main.h"\
+ "..\..\include\http_protocol.h"\
+ "..\..\include\http_request.h"\
+ "..\..\include\http_vhost.h"\
+ "..\..\include\httpd.h"\
+ "..\..\include\os.h"\
+ "..\..\include\util_cfgtree.h"\
+ "..\..\include\util_charset.h"\
+ "..\..\include\util_ebcdic.h"\
+ "..\..\include\util_filter.h"\
+ "..\..\include\util_mutex.h"\
+ "..\..\include\util_script.h"\
+ "..\..\srclib\apr-util\include\apr_buckets.h"\
+ "..\..\srclib\apr-util\include\apr_date.h"\
+ "..\..\srclib\apr-util\include\apr_hooks.h"\
+ "..\..\srclib\apr-util\include\apr_md5.h"\
+ "..\..\srclib\apr-util\include\apr_optional.h"\
+ "..\..\srclib\apr-util\include\apr_optional_hooks.h"\
+ "..\..\srclib\apr-util\include\apr_reslist.h"\
+ "..\..\srclib\apr-util\include\apr_strmatch.h"\
+ "..\..\srclib\apr-util\include\apr_uri.h"\
+ "..\..\srclib\apr-util\include\apr_uuid.h"\
+ "..\..\srclib\apr-util\include\apr_xlate.h"\
+ "..\..\srclib\apr-util\include\apu.h"\
+ "..\..\srclib\apr\include\apr.h"\
+ "..\..\srclib\apr\include\apr_allocator.h"\
+ "..\..\srclib\apr\include\apr_dso.h"\
+ "..\..\srclib\apr\include\apr_errno.h"\
+ "..\..\srclib\apr\include\apr_file_info.h"\
+ "..\..\srclib\apr\include\apr_file_io.h"\
+ "..\..\srclib\apr\include\apr_fnmatch.h"\
+ "..\..\srclib\apr\include\apr_general.h"\
+ "..\..\srclib\apr\include\apr_global_mutex.h"\
+ "..\..\srclib\apr\include\apr_hash.h"\
+ "..\..\srclib\apr\include\apr_inherit.h"\
+ "..\..\srclib\apr\include\apr_lib.h"\
+ "..\..\srclib\apr\include\apr_mmap.h"\
+ "..\..\srclib\apr\include\apr_network_io.h"\
+ "..\..\srclib\apr\include\apr_poll.h"\
+ "..\..\srclib\apr\include\apr_pools.h"\
+ "..\..\srclib\apr\include\apr_portable.h"\
+ "..\..\srclib\apr\include\apr_proc_mutex.h"\
+ "..\..\srclib\apr\include\apr_ring.h"\
+ "..\..\srclib\apr\include\apr_shm.h"\
+ "..\..\srclib\apr\include\apr_strings.h"\
+ "..\..\srclib\apr\include\apr_tables.h"\
+ "..\..\srclib\apr\include\apr_thread_mutex.h"\
+ "..\..\srclib\apr\include\apr_thread_proc.h"\
+ "..\..\srclib\apr\include\apr_time.h"\
+ "..\..\srclib\apr\include\apr_user.h"\
+ "..\..\srclib\apr\include\apr_want.h"\
+ ".\mod_proxy.h"\
+ ".\scgi.h"\
+
+
+..\..\build\win32\httpd.rc : \
+ "..\..\include\ap_release.h"\
+
diff --git a/modules/proxy/mod_proxy_uwsgi.mak b/modules/proxy/mod_proxy_uwsgi.mak
new file mode 100644
index 0000000000..6db95e5684
--- /dev/null
+++ b/modules/proxy/mod_proxy_uwsgi.mak
@@ -0,0 +1,380 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on mod_proxy_uwsgi.dsp
+!IF "$(CFG)" == ""
+CFG=mod_proxy_uwsgi - Win32 Release
+!MESSAGE No configuration specified. Defaulting to mod_proxy_uwsgi - Win32 Release.
+!ENDIF
+
+!IF "$(CFG)" != "mod_proxy_uwsgi - Win32 Release" && "$(CFG)" != "mod_proxy_uwsgi - Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "mod_proxy_uwsgi.mak" CFG="mod_proxy_uwsgi - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "mod_proxy_uwsgi - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "mod_proxy_uwsgi - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+!IF "$(CFG)" == "mod_proxy_uwsgi - Win32 Release"
+
+OUTDIR=.\Release
+INTDIR=.\Release
+DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\mod_proxy_uwsgi.so" "$(DS_POSTBUILD_DEP)"
+
+!ELSE
+
+ALL : "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_proxy_uwsgi.so" "$(DS_POSTBUILD_DEP)"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\mod_proxy_uwsgi.obj"
+ -@erase "$(INTDIR)\mod_proxy_uwsgi.res"
+ -@erase "$(INTDIR)\mod_proxy_uwsgi_src.idb"
+ -@erase "$(INTDIR)\mod_proxy_uwsgi_src.pdb"
+ -@erase "$(OUTDIR)\mod_proxy_uwsgi.exp"
+ -@erase "$(OUTDIR)\mod_proxy_uwsgi.lib"
+ -@erase "$(OUTDIR)\mod_proxy_uwsgi.pdb"
+ -@erase "$(OUTDIR)\mod_proxy_uwsgi.so"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_uwsgi_src" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
+RSC=rc.exe
+RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_uwsgi.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_uwsgi.so" /d LONG_NAME="proxy_uwsgi_module for Apache"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_uwsgi.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_uwsgi.pdb" /debug /out:"$(OUTDIR)\mod_proxy_uwsgi.so" /implib:"$(OUTDIR)\mod_proxy_uwsgi.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_uwsgi.so /opt:ref
+LINK32_OBJS= \
+ "$(INTDIR)\mod_proxy_uwsgi.obj" \
+ "$(INTDIR)\mod_proxy_uwsgi.res" \
+ "..\..\srclib\apr\Release\libapr-1.lib" \
+ "..\..\srclib\apr-util\Release\libaprutil-1.lib" \
+ "..\..\Release\libhttpd.lib" \
+ "$(OUTDIR)\mod_proxy.lib"
+
+"$(OUTDIR)\mod_proxy_uwsgi.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+TargetPath=.\Release\mod_proxy_uwsgi.so
+SOURCE="$(InputPath)"
+PostBuild_Desc=Embed .manifest
+DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
+
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_uwsgi.so"
+ if exist .\Release\mod_proxy_uwsgi.so.manifest mt.exe -manifest .\Release\mod_proxy_uwsgi.so.manifest -outputresource:.\Release\mod_proxy_uwsgi.so;2
+ echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
+
+!ELSEIF "$(CFG)" == "mod_proxy_uwsgi - Win32 Debug"
+
+OUTDIR=.\Debug
+INTDIR=.\Debug
+DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\mod_proxy_uwsgi.so" "$(DS_POSTBUILD_DEP)"
+
+!ELSE
+
+ALL : "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_proxy_uwsgi.so" "$(DS_POSTBUILD_DEP)"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\mod_proxy_uwsgi.obj"
+ -@erase "$(INTDIR)\mod_proxy_uwsgi.res"
+ -@erase "$(INTDIR)\mod_proxy_uwsgi_src.idb"
+ -@erase "$(INTDIR)\mod_proxy_uwsgi_src.pdb"
+ -@erase "$(OUTDIR)\mod_proxy_uwsgi.exp"
+ -@erase "$(OUTDIR)\mod_proxy_uwsgi.lib"
+ -@erase "$(OUTDIR)\mod_proxy_uwsgi.pdb"
+ -@erase "$(OUTDIR)\mod_proxy_uwsgi.so"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_uwsgi_src" /FD /EHsc /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
+RSC=rc.exe
+RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_uwsgi.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_uwsgi.so" /d LONG_NAME="proxy_uwsgi_module for Apache"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_uwsgi.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_uwsgi.pdb" /debug /out:"$(OUTDIR)\mod_proxy_uwsgi.so" /implib:"$(OUTDIR)\mod_proxy_uwsgi.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_uwsgi.so
+LINK32_OBJS= \
+ "$(INTDIR)\mod_proxy_uwsgi.obj" \
+ "$(INTDIR)\mod_proxy_uwsgi.res" \
+ "..\..\srclib\apr\Debug\libapr-1.lib" \
+ "..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
+ "..\..\Debug\libhttpd.lib" \
+ "$(OUTDIR)\mod_proxy.lib"
+
+"$(OUTDIR)\mod_proxy_uwsgi.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+TargetPath=.\Debug\mod_proxy_uwsgi.so
+SOURCE="$(InputPath)"
+PostBuild_Desc=Embed .manifest
+DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
+
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_uwsgi.so"
+ if exist .\Debug\mod_proxy_uwsgi.so.manifest mt.exe -manifest .\Debug\mod_proxy_uwsgi.so.manifest -outputresource:.\Debug\mod_proxy_uwsgi.so;2
+ echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
+
+!ENDIF
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("mod_proxy_uwsgi.dep")
+!INCLUDE "mod_proxy_uwsgi.dep"
+!ELSE
+!MESSAGE Warning: cannot find "mod_proxy_uwsgi.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "mod_proxy_uwsgi - Win32 Release" || "$(CFG)" == "mod_proxy_uwsgi - Win32 Debug"
+SOURCE=.\mod_proxy_uwsgi.c
+
+"$(INTDIR)\mod_proxy_uwsgi.obj" : $(SOURCE) "$(INTDIR)"
+
+
+!IF "$(CFG)" == "mod_proxy_uwsgi - Win32 Release"
+
+"libapr - Win32 Release" :
+ cd ".\..\..\srclib\apr"
+ $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release"
+ cd "..\..\modules\proxy"
+
+"libapr - Win32 ReleaseCLEAN" :
+ cd ".\..\..\srclib\apr"
+ $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN
+ cd "..\..\modules\proxy"
+
+!ELSEIF "$(CFG)" == "mod_proxy_uwsgi - Win32 Debug"
+
+"libapr - Win32 Debug" :
+ cd ".\..\..\srclib\apr"
+ $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug"
+ cd "..\..\modules\proxy"
+
+"libapr - Win32 DebugCLEAN" :
+ cd ".\..\..\srclib\apr"
+ $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN
+ cd "..\..\modules\proxy"
+
+!ENDIF
+
+!IF "$(CFG)" == "mod_proxy_uwsgi - Win32 Release"
+
+"libaprutil - Win32 Release" :
+ cd ".\..\..\srclib\apr-util"
+ $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release"
+ cd "..\..\modules\proxy"
+
+"libaprutil - Win32 ReleaseCLEAN" :
+ cd ".\..\..\srclib\apr-util"
+ $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN
+ cd "..\..\modules\proxy"
+
+!ELSEIF "$(CFG)" == "mod_proxy_uwsgi - Win32 Debug"
+
+"libaprutil - Win32 Debug" :
+ cd ".\..\..\srclib\apr-util"
+ $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug"
+ cd "..\..\modules\proxy"
+
+"libaprutil - Win32 DebugCLEAN" :
+ cd ".\..\..\srclib\apr-util"
+ $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN
+ cd "..\..\modules\proxy"
+
+!ENDIF
+
+!IF "$(CFG)" == "mod_proxy_uwsgi - Win32 Release"
+
+"libhttpd - Win32 Release" :
+ cd ".\..\.."
+ $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release"
+ cd ".\modules\proxy"
+
+"libhttpd - Win32 ReleaseCLEAN" :
+ cd ".\..\.."
+ $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN
+ cd ".\modules\proxy"
+
+!ELSEIF "$(CFG)" == "mod_proxy_uwsgi - Win32 Debug"
+
+"libhttpd - Win32 Debug" :
+ cd ".\..\.."
+ $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug"
+ cd ".\modules\proxy"
+
+"libhttpd - Win32 DebugCLEAN" :
+ cd ".\..\.."
+ $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN
+ cd ".\modules\proxy"
+
+!ENDIF
+
+!IF "$(CFG)" == "mod_proxy_uwsgi - Win32 Release"
+
+"mod_proxy - Win32 Release" :
+ cd "."
+ $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release"
+ cd "."
+
+"mod_proxy - Win32 ReleaseCLEAN" :
+ cd "."
+ $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN
+ cd "."
+
+!ELSEIF "$(CFG)" == "mod_proxy_uwsgi - Win32 Debug"
+
+"mod_proxy - Win32 Debug" :
+ cd "."
+ $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug"
+ cd "."
+
+"mod_proxy - Win32 DebugCLEAN" :
+ cd "."
+ $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN
+ cd "."
+
+!ENDIF
+
+SOURCE=..\..\build\win32\httpd.rc
+
+!IF "$(CFG)" == "mod_proxy_uwsgi - Win32 Release"
+
+
+"$(INTDIR)\mod_proxy_uwsgi.res" : $(SOURCE) "$(INTDIR)"
+ $(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_uwsgi.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_proxy_uwsgi.so" /d LONG_NAME="proxy_uwsgi_module for Apache" $(SOURCE)
+
+
+!ELSEIF "$(CFG)" == "mod_proxy_uwsgi - Win32 Debug"
+
+
+"$(INTDIR)\mod_proxy_uwsgi.res" : $(SOURCE) "$(INTDIR)"
+ $(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_uwsgi.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_proxy_uwsgi.so" /d LONG_NAME="proxy_uwsgi_module for Apache" $(SOURCE)
+
+
+!ENDIF
+
+
+!ENDIF
+
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c
index 11cbe9187a..59f5e3084d 100644
--- a/modules/proxy/proxy_util.c
+++ b/modules/proxy/proxy_util.c
@@ -1694,9 +1694,13 @@ PROXY_DECLARE(char *) ap_proxy_define_worker(apr_pool_t *p,
ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(010117)
"Alert! worker scheme (%s) too long; truncated to: %s", uri.scheme, wshared->scheme);
}
+ if (PROXY_STRNCPY(wshared->hostname_ex, uri.hostname) != APR_SUCCESS) {
+ return apr_psprintf(p, "worker hostname (%s) too long", uri.hostname);
+ }
if (PROXY_STRNCPY(wshared->hostname, uri.hostname) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(010118)
- "Alert! worker hostname (%s) too long; truncated to: %s", uri.hostname, wshared->hostname);
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, APLOGNO(010118)
+ "worker hostname (%s) too long; truncated for legacy modules that do not use "
+ "proxy_worker_shared->hostname_ex: %s", uri.hostname, wshared->hostname);
}
wshared->flush_packets = flush_off;
wshared->flush_wait = PROXY_FLUSH_WAIT;
@@ -1854,7 +1858,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00930)
"initialized pool in child %" APR_PID_T_FMT " for (%s) min=%d max=%d smax=%d",
- getpid(), worker->s->hostname, worker->s->min,
+ getpid(), worker->s->hostname_ex, worker->s->min,
worker->s->hmax, worker->s->smax);
/* Set the acquire timeout */
@@ -1871,7 +1875,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00931)
"initialized single connection worker in child %" APR_PID_T_FMT " for (%s)",
- getpid(), worker->s->hostname);
+ getpid(), worker->s->hostname_ex);
}
apr_global_mutex_unlock(proxy_mutex);
@@ -1890,7 +1894,7 @@ static int ap_proxy_retry_worker(const char *proxy_function, proxy_worker *worke
if (PROXY_WORKER_IS(worker, PROXY_WORKER_STOPPED)) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(3305)
"%s: Won't retry worker (%s): stopped",
- proxy_function, worker->s->hostname);
+ proxy_function, worker->s->hostname_ex);
return DECLINED;
}
if ((worker->s->status & PROXY_WORKER_IGNORE_ERRORS)
@@ -1899,13 +1903,13 @@ static int ap_proxy_retry_worker(const char *proxy_function, proxy_worker *worke
worker->s->status &= ~PROXY_WORKER_IN_ERROR;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00932)
"%s: worker for (%s) has been marked for retry",
- proxy_function, worker->s->hostname);
+ proxy_function, worker->s->hostname_ex);
return OK;
}
else {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00933)
"%s: too soon to retry worker for (%s)",
- proxy_function, worker->s->hostname);
+ proxy_function, worker->s->hostname_ex);
return DECLINED;
}
}
@@ -2127,7 +2131,7 @@ PROXY_DECLARE(int) ap_proxy_acquire_connection(const char *proxy_function,
if (!PROXY_WORKER_IS_USABLE(worker)) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00940)
"%s: disabled connection for (%s)",
- proxy_function, worker->s->hostname);
+ proxy_function, worker->s->hostname_ex);
return HTTP_SERVICE_UNAVAILABLE;
}
}
@@ -2150,12 +2154,12 @@ PROXY_DECLARE(int) ap_proxy_acquire_connection(const char *proxy_function,
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00941)
"%s: failed to acquire connection for (%s)",
- proxy_function, worker->s->hostname);
+ proxy_function, worker->s->hostname_ex);
return HTTP_SERVICE_UNAVAILABLE;
}
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00942)
"%s: has acquired connection for (%s)",
- proxy_function, worker->s->hostname);
+ proxy_function, worker->s->hostname_ex);
(*conn)->worker = worker;
(*conn)->close = 0;
@@ -2170,7 +2174,7 @@ PROXY_DECLARE(int) ap_proxy_release_connection(const char *proxy_function,
{
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00943)
"%s: has released connection for (%s)",
- proxy_function, conn->worker->s->hostname);
+ proxy_function, conn->worker->s->hostname_ex);
connection_cleanup(conn);
return OK;
@@ -2766,7 +2770,7 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
"%s: error creating Unix domain socket for "
"target %s",
proxy_function,
- worker->s->hostname);
+ worker->s->hostname_ex);
break;
}
conn->connection = NULL;
@@ -2779,7 +2783,7 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
"%s (%s) failed",
proxy_function,
conn->uds_path,
- worker->s->hostname);
+ worker->s->hostname_ex);
break;
}
@@ -2788,7 +2792,7 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
"%s (%s)",
proxy_function,
conn->uds_path,
- worker->s->hostname);
+ worker->s->hostname_ex);
}
else
#endif
@@ -2802,7 +2806,7 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
"target %s",
proxy_function,
backend_addr->family,
- worker->s->hostname);
+ worker->s->hostname_ex);
/*
* this could be an IPv6 address from the DNS but the
* local machine won't give us an IPv6 socket; hopefully the
@@ -2852,7 +2856,7 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
}
ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, s,
"%s: fam %d socket created to connect to %s",
- proxy_function, backend_addr->family, worker->s->hostname);
+ proxy_function, backend_addr->family, worker->s->hostname_ex);
if (conf->source_address_set) {
local_addr = apr_pmemdup(conn->scpool, conf->source_address,
@@ -2877,7 +2881,7 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
"%s: attempt to connect to %pI (%s) failed",
proxy_function,
backend_addr,
- worker->s->hostname);
+ worker->s->hostname_ex);
backend_addr = backend_addr->next;
continue;
}
@@ -2886,7 +2890,7 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
"%s: connection established with %pI (%s)",
proxy_function,
backend_addr,
- worker->s->hostname);
+ worker->s->hostname_ex);
}
/* Set a timeout on the socket */
@@ -2920,7 +2924,7 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
"via http CONNECT through %pI (%s) failed",
proxy_function,
forward->target_host, forward->target_port,
- backend_addr, worker->s->hostname);
+ backend_addr, worker->s->hostname_ex);
backend_addr = backend_addr->next;
continue;
}
@@ -2942,7 +2946,7 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00959)
"ap_proxy_connect_backend disabling worker for (%s) for %"
APR_TIME_T_FMT "s",
- worker->s->hostname, apr_time_sec(worker->s->retry));
+ worker->s->hostname_ex, apr_time_sec(worker->s->retry));
}
}
else {