Merged in changes from 1.6.3

This commit is contained in:
Robert James Kaes committed 2004-08-10 21:24:24 +00:00
1 parent 18df4910a4
commit badc7673d0
8 files changed
+36 -18

No files matched your search

+6 -5
View File
@@ -1,4 +1,4 @@
/* $Id: reqs.c,v 1.112 2004-04-27 18:53:14 rjkaes Exp $
/* $Id: reqs.c,v 1.113 2004-08-10 21:24:23 rjkaes Exp $
*
* This is where all the work in tinyproxy is actually done. Incoming
* connections have a new child created for them. The child then
@@ -1223,7 +1223,7 @@ process_client_headers(struct conn_s *connptr, hashmap_t hashofheaders)
* proxy is in use.)
*/
if (connptr->server_fd == -1 || connptr->show_stats
|| (connptr->connect_method && !UPSTREAM_CONFIGURED())) {
|| (connptr->connect_method && (connptr->upstream_proxy == NULL))) {
log_message(LOG_INFO, "Not sending client headers to remote machine");
return 0;
}
@@ -1600,7 +1600,7 @@ connect_to_upstream(struct conn_s *connptr, struct request_s *request)
char *combined_string;
int len;
struct upstream *cur_upstream = upstream_get(request->host);
struct upstream *cur_upstream = connptr->upstream_proxy;
if(!cur_upstream) {
log_message(LOG_WARNING,
"No upstream proxy defined for %s.",
@@ -1751,7 +1751,8 @@ handle_connection(int fd)
goto send_error;
}
if (UPSTREAM_CONFIGURED() && (UPSTREAM_HOST(request->host) != NULL)) {
connptr->upstream_proxy = UPSTREAM_HOST(request->host);
if (connptr->upstream_proxy != NULL) {
if (connect_to_upstream(connptr, request) < 0) {
goto send_error;
}
@@ -1797,7 +1798,7 @@ handle_connection(int fd)
return;
}
if (!connptr->connect_method || UPSTREAM_CONFIGURED()) {
if (!connptr->connect_method || (connptr->upstream_proxy != NULL)) {
if (process_server_headers(connptr) < 0) {
if (connptr->error_variables)
send_http_error_message(connptr);