Lines 191-196
Link Here
|
191 |
err = apr_sockaddr_info_get(&uri_addr, apr_pstrdup(c->pool, uri->hostname), |
191 |
err = apr_sockaddr_info_get(&uri_addr, apr_pstrdup(c->pool, uri->hostname), |
192 |
APR_UNSPEC, uri->port, 0, c->pool); |
192 |
APR_UNSPEC, uri->port, 0, c->pool); |
193 |
|
193 |
|
|
|
194 |
if (err != APR_SUCCESS) { |
195 |
return ap_proxyerror(r, HTTP_BAD_GATEWAY, |
196 |
apr_pstrcat(p, "DNS lookup failure: hostname ", |
197 |
uri_hostname, NULL)); |
198 |
} |
199 |
|
194 |
/* allocate these out of the connection pool - the check on |
200 |
/* allocate these out of the connection pool - the check on |
195 |
* r->connection->id makes sure that this string does not get accessed |
201 |
* r->connection->id makes sure that this string does not get accessed |
196 |
* past the connection lifetime */ |
202 |
* past the connection lifetime */ |
Lines 201-206
Link Here
|
201 |
/* see memory note above */ |
207 |
/* see memory note above */ |
202 |
err = apr_sockaddr_info_get(&p_conn->addr, p_conn->name, APR_UNSPEC, |
208 |
err = apr_sockaddr_info_get(&p_conn->addr, p_conn->name, APR_UNSPEC, |
203 |
p_conn->port, 0, c->pool); |
209 |
p_conn->port, 0, c->pool); |
|
|
210 |
if (err != APR_SUCCESS) { |
211 |
return ap_proxyerror(r, HTTP_BAD_GATEWAY, |
212 |
apr_pstrcat(p, "DNS lookup failure: proxyname ", |
213 |
p_conn->name, NULL)); |
214 |
} |
204 |
} else { |
215 |
} else { |
205 |
p_conn->name = apr_pstrdup(c->pool, uri->hostname); |
216 |
p_conn->name = apr_pstrdup(c->pool, uri->hostname); |
206 |
p_conn->port = uri->port; |
217 |
p_conn->port = uri->port; |
Lines 211-222
Link Here
|
211 |
uri->fragment ? uri->fragment : "", NULL); |
222 |
uri->fragment ? uri->fragment : "", NULL); |
212 |
} |
223 |
} |
213 |
|
224 |
|
214 |
if (err != APR_SUCCESS) { |
|
|
215 |
return ap_proxyerror(r, HTTP_BAD_GATEWAY, |
216 |
apr_pstrcat(p, "DNS lookup failure for: ", |
217 |
p_conn->name, NULL)); |
218 |
} |
219 |
|
220 |
/* Get the server port for the Via headers */ |
225 |
/* Get the server port for the Via headers */ |
221 |
{ |
226 |
{ |
222 |
server_port = ap_get_server_port(r); |
227 |
server_port = ap_get_server_port(r); |