You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by Alexei Kosut <ak...@hyperreal.com> on 1996/06/17 22:17:07 UTC
cvs commit: apache/src CHANGES http_protocol.c httpd.h mod_log_common.c
akosut 96/06/17 13:17:06
Modified: src CHANGES http_protocol.c httpd.h mod_log_common.c
Log:
Restore r->bytes_sent.
Submitted by: Robert S. Thau
Revision Changes Path
1.30 +2 -0 apache/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apache/src/CHANGES,v
retrieving revision 1.29
retrieving revision 1.30
diff -C3 -r1.29 -r1.30
*** CHANGES 1996/06/16 02:34:28 1.29
--- CHANGES 1996/06/17 20:17:01 1.30
***************
*** 1,5 ****
--- 1,7 ----
Changes with Apache 1.1b4:
+ *) r->bytes_sent variable restored
+
*) More possibly unsecure programs removed from the support directory.
*) More mod_auth_msql authentication improvements.
1.24 +11 -0 apache/src/http_protocol.c
Index: http_protocol.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_protocol.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C3 -r1.23 -r1.24
*** http_protocol.c 1996/06/13 16:33:50 1.23
--- http_protocol.c 1996/06/17 20:17:02 1.24
***************
*** 71,76 ****
--- 71,81 ----
#include <stdarg.h>
+ #define SET_BYTES_SENT(r) \
+ do { if (r->sent_bodyct) \
+ bgetopt (r->connection->client, BO_BYTECT, &r->bytes_sent); \
+ } while (0)
+
/* Handling of conditional gets (if-modified-since); Roy owes Rob beer.
* This would be considerably easier if strptime or timegm were portable...
*/
***************
*** 502,507 ****
--- 507,513 ----
void finalize_sub_req_protocol (request_rec *sub)
{
+ SET_BYTES_SENT (sub->main);
}
/* Support for the Basic authentication protocol, and a bit for Digest.
***************
*** 754,759 ****
--- 760,766 ----
}
bflush(c->client);
+ SET_BYTES_SENT(r);
return total_bytes_sent;
}
***************
*** 761,766 ****
--- 768,774 ----
{
if (r->connection->aborted) return EOF;
bputc(c, r->connection->client);
+ SET_BYTES_SENT(r);
return c;
}
***************
*** 768,773 ****
--- 776,782 ----
rputs(const char *str, request_rec *r)
{
if (r->connection->aborted) return EOF;
+ SET_BYTES_SENT(r);
return bputs(str, r->connection->client);
}
***************
*** 780,785 ****
--- 789,795 ----
va_start(vlist,fmt);
n=vbprintf(r->connection->client,fmt,vlist);
va_end(vlist);
+ SET_BYTES_SENT(r);
return n;
}
***************
*** 809,814 ****
--- 819,825 ----
}
va_end(args);
+ SET_BYTES_SENT(r);
return k;
}
1.32 +1 -0 apache/src/httpd.h
Index: httpd.h
===================================================================
RCS file: /export/home/cvs/apache/src/httpd.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -C3 -r1.31 -r1.32
*** httpd.h 1996/06/16 02:39:03 1.31
--- httpd.h 1996/06/17 20:17:03 1.32
***************
*** 353,358 ****
--- 353,359 ----
int method_number; /* M_GET, M_POST, etc. */
int sent_bodyct; /* byte count in stream is for body */
+ long bytes_sent; /* body byte count, for easy access */
/* MIME header environments, in and out. Also, an array containing
* environment variables to be passed to subprocesses, so people can
1.6 +2 -7 apache/src/mod_log_common.c
Index: mod_log_common.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_log_common.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C3 -r1.5 -r1.6
*** mod_log_common.c 1996/03/01 02:46:46 1.5
--- mod_log_common.c 1996/06/17 20:17:03 1.6
***************
*** 182,194 ****
if (r->status != -1) sprintf(status,"%d ", r->status);
else strcpy(status, "- ");
! if (r->sent_bodyct)
! {
! long int bs;
!
! bgetopt(r->connection->client, BO_BYTECT, &bs);
! sprintf(&status[strlen(status)], "%ld\n", bs);
! }
else
strcat(status, "-\n");
--- 182,189 ----
if (r->status != -1) sprintf(status,"%d ", r->status);
else strcpy(status, "- ");
! if (r->bytes_sent > 0)
! sprintf(&status[strlen(status)], "%ld\n", r->bytes_sent);
else
strcat(status, "-\n");