You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "zuiyangqingzhou (via GitHub)" <gi...@apache.org> on 2023/03/02 12:39:03 UTC

[GitHub] [apisix] zuiyangqingzhou opened a new issue, #8995: bug: The gzip plugin does not work in special scenarios

zuiyangqingzhou opened a new issue, #8995:
URL: https://github.com/apache/apisix/issues/8995

   ### Current Behavior
   
   0. Openresty as the upstream, the configuration file is as follows
   ```
   pid logs/nginx.pid;
   events {
       worker_connections 1024;
   }
   
   http {
       server {
           listen 8866;
           location / {
   	    content_by_lua '
   	    	 ngx.say("hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world.")
   	    ';
           }
       }
   }
   ```
   1. enable the proxy-rewrite plugin,config as follow
   ```
    "gzip": {
         "buffers": {
           "number": 64,
           "size": 4096
         },
         "comp_level": 5,
         "disable": false,
         "min_length": 200,
         "types": "*",
         "vary": true
       }
   ```
   2. send a request without a via header
   ```
   curl http://127.0.0.1:9080/test_gzip -H 'accept-encoding: gzip' -i
   ```
   - output
   ```
   HTTP/1.1 200 OK
   Content-Type: text/plain; charset=utf-8
   Transfer-Encoding: chunked
   Connection: keep-alive
   Date: Thu, 02 Mar 2023 12:33:53 GMT
   Server: Openresty
   Vary: Accept-Encoding
   Content-Encoding: gzip
   
   Warning: Binary output can mess up your terminal. Use "--output -" to tell
   Warning: curl to output it to your terminal anyway, or consider "--output
   Warning: <FILE>" to save to a file.
   ```
   3. send a request with a via header
   ```
   curl http://127.0.0.1:9080/test_gzip -H 'accept-encoding: gzip' -i -H 'via: aaa'
   ```
   - output
   ```
   HTTP/1.1 200 OK
   Content-Type: text/plain; charset=utf-8
   Transfer-Encoding: chunked
   Connection: keep-alive
   Date: Thu, 02 Mar 2023 12:36:11 GMT
   Server: Openresty
   Vary: Accept-Encoding
   
   hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world. hello, world.
   ```
   
   ### Expected Behavior
   
   The compression behavior of apisix should not be affected by the via header
   
   ### Error Logs
   
   none
   
   ### Steps to Reproduce
   
   Same as above
   
   ### Environment
   
   - APISIX version (run `apisix version`): 2.10.5
   - Operating system (run `uname -a`): amzn2.x86_64
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): openresty/1.19.9.1
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): 3.5
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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@apisix.apache.org.apache.org

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


[GitHub] [apisix] spacewander commented on issue #8995: bug: The gzip plugin does not work in special scenarios

Posted by "spacewander (via GitHub)" <gi...@apache.org>.
spacewander commented on issue #8995:
URL: https://github.com/apache/apisix/issues/8995#issuecomment-1455079011

   PR is welcome!


-- 
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@apisix.apache.org

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


[GitHub] [apisix] tokers commented on issue #8995: bug: The gzip plugin does not work in special scenarios

Posted by "tokers (via GitHub)" <gi...@apache.org>.
tokers commented on issue #8995:
URL: https://github.com/apache/apisix/issues/8995#issuecomment-1452791775

   `2.10.5` is too old. Try the latest version to see if the gzip plugin works.


-- 
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@apisix.apache.org

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


Re: [I] bug: The gzip plugin does not work in special scenarios [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #8995: bug:  The gzip plugin does not work in special scenarios
URL: https://github.com/apache/apisix/issues/8995


-- 
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@apisix.apache.org

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


Re: [I] bug: The gzip plugin does not work in special scenarios [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8995:
URL: https://github.com/apache/apisix/issues/8995#issuecomment-1952102826

   This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
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@apisix.apache.org

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


[GitHub] [apisix] zuiyangqingzhou commented on issue #8995: bug: The gzip plugin does not work in special scenarios

Posted by "zuiyangqingzhou (via GitHub)" <gi...@apache.org>.
zuiyangqingzhou commented on issue #8995:
URL: https://github.com/apache/apisix/issues/8995#issuecomment-1455314008

   > PR is welcome!
   
   OK


-- 
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@apisix.apache.org

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


Re: [I] bug: The gzip plugin does not work in special scenarios [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8995:
URL: https://github.com/apache/apisix/issues/8995#issuecomment-1976294779

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
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@apisix.apache.org

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


[GitHub] [apisix] zuiyangqingzhou commented on issue #8995: bug: The gzip plugin does not work in special scenarios

Posted by "zuiyangqingzhou (via GitHub)" <gi...@apache.org>.
zuiyangqingzhou commented on issue #8995:
URL: https://github.com/apache/apisix/issues/8995#issuecomment-1452922719

   > Or we can override it via custom Nginx conf: https://github.com/apache/apisix/blob/master/docs/en/latest/customize-nginx-configuration.md
   
   Got it. Thank you for your reply.
   


-- 
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@apisix.apache.org

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


[GitHub] [apisix] spacewander commented on issue #8995: bug: The gzip plugin does not work in special scenarios

Posted by "spacewander (via GitHub)" <gi...@apache.org>.
spacewander commented on issue #8995:
URL: https://github.com/apache/apisix/issues/8995#issuecomment-1452840384

   It is Nginx itself that disables the gzip, see code
   https://github.com/nginx/nginx/blob/4ace957c4e08bcbf9ef5e9f83b8e43458bead77f/src/http/ngx_http_core_module.c#L2071
   and configuration:
   http://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_proxied
   
   APISIX so far doesn't have route-level option to override this behavior.


-- 
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@apisix.apache.org

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


[GitHub] [apisix] spacewander commented on issue #8995: bug: The gzip plugin does not work in special scenarios

Posted by "spacewander (via GitHub)" <gi...@apache.org>.
spacewander commented on issue #8995:
URL: https://github.com/apache/apisix/issues/8995#issuecomment-1452850038

   Or we can override it via custom Nginx conf: https://github.com/apache/apisix/blob/master/docs/en/latest/customize-nginx-configuration.md


-- 
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@apisix.apache.org

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