You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@httpd.apache.org by GitBox <gi...@apache.org> on 2021/12/03 12:44:06 UTC

[GitHub] [httpd] rpluem commented on a change in pull request #280: Tweak FLUSH handling in mod_deflate input filter

rpluem commented on a change in pull request #280:
URL: https://github.com/apache/httpd/pull/280#discussion_r761903011



##########
File path: modules/filters/mod_deflate.c
##########
@@ -1313,9 +1314,7 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
                 break;
             }
 
-            if (APR_BUCKET_IS_FLUSH(bkt)) {
-                apr_bucket *tmp_b;
-
+            if (APR_BUCKET_IS_FLUSH(bkt) && !ctx->done) {

Review comment:
       Wouldn't it be more efficient and saving one `APR_BUCKET_IS_FLUSH(bkt)` if we do the following:
   
   ```suggestion
               if (APR_BUCKET_IS_FLUSH(bkt)) {
                   if (!ctx->done) {
   ```
   And put line 1319 till 1350 in that block?
   Of course this makes my first comment moot and `apr_bucket *tmp_b` could stay where it is.
   
   

##########
File path: modules/filters/mod_deflate.c
##########
@@ -1298,6 +1298,7 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
         {
             const char *data;
             apr_size_t len;
+            apr_bucket *tmp_b;

Review comment:
       Can't we move this to line 1354? The block starting there seems to be the only one that needs it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@httpd.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@httpd.apache.org
For additional commands, e-mail: notifications-help@httpd.apache.org