DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=30730>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30730 ------- Additional Comments From [EMAIL PROTECTED] 2007-03-29 17:16 ------- I debugged the issue in trunk. eor_bucket_cleanup is getting called. It also invokes ap_increment_count. But there are two request objects. One is main request object and another one is the redirected request object which is created by ap_internal_redirect_handler request_rec *new = internal_internal_redirect(new_uri, r); eor_bucket_cleanup is called with main request object. In the case of redirect, bytes_sent are stored in second (redirected) request object (named new). The result is that access counters are incremented correctly but bytes_sent never incremented correctly. We can't call ap_increment_counts for redirected request because in that case access count will be incremented twice. $ curl --dump-header - -o /tmp/one.jpeg http://localhost:4014/conv_test.jpeg Here is the debugging session : Breakpoint 1, ap_process_request (r=0x96ba458) at http_request.c:278 278 conn_rec *c = r->connection; (gdb) c Continuing. Breakpoint 3, ap_internal_redirect_handler (new_uri=0x96bbf30 "/cgi-bin/watermark1.php/conv_test.jpeg", r=0x96ba458) at http_request.c:513 513 request_rec *new = internal_internal_redirect(new_uri, r); (gdb) n 516 if (!new) { (gdb) n 520 if (r->handler) (gdb) n 521 ap_set_content_type(new, r->content_type); (gdb) n 522 access_status = ap_process_request_internal(new); (gdb) n 523 if (access_status == OK) { (gdb) n 524 if ((access_status = ap_invoke_handler(new)) != 0) { (gdb) n 528 ap_finalize_request_protocol(new); (gdb) n 533 } (gdb) p new $10 = (request_rec *) 0x96bbf58 (gdb) p r $11 = (request_rec *) 0x96ba458 (gdb) p new->bytes_sent $12 = 5046 (gdb) p r->bytes_sent $13 = 0 (gdb) c Continuing. Breakpoint 4, eor_bucket_cleanup (data=0x96b47f0) at eor_bucket.c:24 24 apr_bucket *b = (apr_bucket *)data; (gdb) n 25 request_rec *r = (request_rec *)b->data; (gdb) n 27 if (r != NULL) { (gdb) p r $14 = (request_rec *) 0x96ba458 (gdb) p r->bytes_sent $15 = 0 (gdb) n 32 b->data = NULL; (gdb) 34 ap_update_child_status(r->connection->sbh, SERVER_BUSY_LOG, r); (gdb) 35 ap_run_log_transaction(r); (gdb) 36 if (ap_extended_status) { (gdb) 37 ap_increment_counts(r->connection->sbh, r); (gdb) 40 return APR_SUCCESS; (gdb) p r->bytes_sent $16 = 0 (gdb) c I considered transferring for bytes from redirected request object to main request object but I think that might create other problems. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
