>Number:         1900
>Category:       apache-api
>Synopsis:       rputs doesn't compute sent_bodyct correctly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Mar  2 10:10:01 PST 1998
>Last-Modified:
>Originator:     [EMAIL PROTECTED]
>Organization:
apache
>Release:        1.2.4
>Environment:
It's of no use here, but ....:
SunOS su00563 5.5.1 Generic_103640-17 sun4u sparc SUNW,Ultra-1
>Description:
If I use rputs the sent_bodyct-field of my request_rec isn't computed correctly.

After rputs the sent_bodyct contains the number of bytes before rputs was 
called.
>How-To-Repeat:

>Fix:
Change the implementation of rputs in http_protocol.c from:

>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]


>int rputs(const char *str, request_rec *r)
>{
>    if (r->connection->aborted) return EOF;
>    SET_BYTES_SENT(r);
>    return bputs(str, r->connection->client);
>}

to:

>int rputs(const char *str, request_rec *r)
>{
>    int rcode;
>
>    if (r->connection->aborted) return EOF;
>    rcode=bputs(str, r->connection->client);
>    SET_BYTES_SENT(r);
>    return rcode;
>}
%0

Reply via email to