dgaudet 99/04/20 12:15:46
Modified: src CHANGES src/main http_main.c http_protocol.c Log: r->request_time wasn't being set in certain error cases PR: 4156 Revision Changes Path 1.1313 +3 -0 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1312 retrieving revision 1.1313 diff -u -r1.1312 -r1.1313 --- CHANGES 1999/04/20 18:36:01 1.1312 +++ CHANGES 1999/04/20 19:15:34 1.1313 @@ -1,5 +1,8 @@ Changes with Apache 1.3.7 + *) r->request_time wasn't being set properly in certain error conditions. + [Dean Gaudet] PR#4156 + *) PORT: deal with UTS compiler error in http_protocol.c [Dave Dykstra <[EMAIL PROTECTED]>] PR#4189 1.430 +6 -1 apache-1.3/src/main/http_main.c Index: http_main.c =================================================================== RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v retrieving revision 1.429 retrieving revision 1.430 diff -u -r1.429 -r1.430 --- http_main.c 1999/04/08 21:04:43 1.429 +++ http_main.c 1999/04/20 19:15:39 1.430 @@ -1079,8 +1079,13 @@ log_req = log_req->prev; } - if (!current_conn->keptalive) + if (!current_conn->keptalive) { + /* in some cases we come here before setting the time */ + if (log_req->request_time == 0) { + log_req->request_time = time(0); + } ap_log_transaction(log_req); + } ap_bsetflag(save_req->connection->client, B_EOUT, 1); ap_bclose(save_req->connection->client); 1.264 +4 -0 apache-1.3/src/main/http_protocol.c Index: http_protocol.c =================================================================== RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v retrieving revision 1.263 retrieving revision 1.264 diff -u -r1.263 -r1.264 --- http_protocol.c 1999/04/20 18:36:07 1.263 +++ http_protocol.c 1999/04/20 19:15:41 1.264 @@ -791,6 +791,10 @@ while ((len = getline(l, sizeof(l), conn->client, 0)) <= 0) { if ((len < 0) || ap_bgetflag(conn->client, B_EOF)) { ap_bsetflag(conn->client, B_SAFEREAD, 0); + /* this is a hack to make sure that request time is set, + * it's not perfect, but it's better than nothing + */ + r->request_time = time(0); return 0; } }