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 10:25:54 UTC

[GitHub] [httpd] notroj opened a new pull request #280: Tweak FLUSH handling in mod_deflate input filter

notroj opened a new pull request #280:
URL: https://github.com/apache/httpd/pull/280


   ```
   * modules/filters/mod_deflate.c (deflate_in_filter): Handle FLUSH in
     the input brigade even if done inflating (ctx->done is true), but
     don't try to flush the inflate stream in that case.  (Caught by
     Coverity)
   ```


-- 
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


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

Posted by GitBox <gi...@apache.org>.
notroj commented on a change in pull request #280:
URL: https://github.com/apache/httpd/pull/280#discussion_r761916842



##########
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:
       Thanks!  Yes, I was playing around with some other changes and ended up with this... makes much more sense that way.




-- 
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


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

Posted by GitBox <gi...@apache.org>.
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 in the current code. Hence:
   
   ```suggestion
               if (APR_BUCKET_IS_FLUSH(bkt)) {
                   apr_bucket *tmp_b;
                   
                   if (!ctx->done) {
   ```
   
   
   




-- 
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


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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [httpd] asfgit closed pull request #280: Tweak FLUSH handling in mod_deflate input filter

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #280:
URL: https://github.com/apache/httpd/pull/280


   


-- 
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