-const char jcc_rcs[] = "$Id: jcc.c,v 1.63 2002/03/02 04:14:50 david__schmidt Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.64 2002/03/03 09:18:03 joergs Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
*
* Revisions :
* $Log: jcc.c,v $
+ * Revision 1.64 2002/03/03 09:18:03 joergs
+ * Made jumbjuster work on AmigaOS again.
+ *
* Revision 1.63 2002/03/02 04:14:50 david__schmidt
* Clean up a little CRLF unpleasantness that suddenly appeared
*
}
}
+ /*
+ * Save a copy of the original request for logging
+ */
+ http->ocmd = strdup(http->cmd);
+
+ if (http->ocmd == NULL)
+ {
+ log_error(LOG_LEVEL_FATAL, "Out of memory copying HTTP request line");
+ }
+
/*
* (Re)build the HTTP request for non-SSL requests.
* If forwarding, use the whole URL, else, use only the path.
/* Log (FIXME: All intercept reasons apprear as "crunch" with Status 200) */
log_error(LOG_LEVEL_GPC, "%s%s crunch!", http->hostport, http->path);
- log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s\" 200 3", csp->ip_addr_str, http->cmd);
+ log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s\" 200 3", csp->ip_addr_str, http->ocmd);
/* Clean up and return */
free_http_response(rsp);
rsp = error_response(csp, "no-such-domain", errno);
log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s\" 404 0",
- csp->ip_addr_str, http->cmd);
+ csp->ip_addr_str, http->ocmd);
}
else
{
rsp = error_response(csp, "connect-failed", errno);
log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s\" 503 0",
- csp->ip_addr_str, http->cmd);
+ csp->ip_addr_str, http->ocmd);
}
http->hostport);
log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s\" 503 0",
- csp->ip_addr_str, http->cmd);
+ csp->ip_addr_str, http->ocmd);
rsp = error_response(csp, "connect-failed", errno);
* client, flush the rest, and get out of the way.
*/
log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s\" 200 2\n",
- csp->ip_addr_str, http->cmd);
+ csp->ip_addr_str, http->ocmd);
if (write_socket(csp->cfd, CSUCCEED, sizeof(CSUCCEED)-1) < 0)
{
log_error(LOG_LEVEL_ERROR, "read from: %s failed: %E", http->host);
log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s\" 503 0",
- csp->ip_addr_str, http->cmd);
+ csp->ip_addr_str, http->ocmd);
rsp = error_response(csp, "connect-failed", errno);
}
log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s\" 200 %d",
- csp->ip_addr_str, http->cmd, byte_count);
+ csp->ip_addr_str, http->ocmd, byte_count);
}