You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/10/29 02:42:28 UTC

[GitHub] [apisix] thekingofworld opened a new issue #2554: request help: abnormal output after using echo plugin

thekingofworld opened a new issue #2554:
URL: https://github.com/apache/apisix/issues/2554


   ### Issue description
   After adding the official echo plugin, the output content did not meet expectations.
   ![image](https://user-images.githubusercontent.com/8169665/97518800-f1790980-19d2-11eb-82c9-ea2995b8f316.png)
   
   here is route config.
   ![image](https://user-images.githubusercontent.com/8169665/97518825-ffc72580-19d2-11eb-9fc7-591d2ea15c64.png)
   
   
   ### Environment
   
   * apisix version (cmd: `apisix version`):  `2.0`
   * OS: `mac os`
   


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

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



[GitHub] [apisix] thekingofworld commented on issue #2554: request help: abnormal output after using echo plugin

Posted by GitBox <gi...@apache.org>.
thekingofworld commented on issue #2554:
URL: https://github.com/apache/apisix/issues/2554#issuecomment-718702808


   @spacewander It seems that there is still a problem after I use your repaired version.
   ![image](https://user-images.githubusercontent.com/8169665/97564777-0f209000-1a20-11eb-943d-26bb5a467706.png)
   


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

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



[GitHub] [apisix] thekingofworld commented on issue #2554: request help: abnormal output after using echo plugin

Posted by GitBox <gi...@apache.org>.
thekingofworld commented on issue #2554:
URL: https://github.com/apache/apisix/issues/2554#issuecomment-718339899


   @spacewander  > The plugin doesn't set Content-Length correctly.
   It seems to be the problem.


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

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



[GitHub] [apisix] spacewander commented on issue #2554: request help: abnormal output after using echo plugin

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #2554:
URL: https://github.com/apache/apisix/issues/2554#issuecomment-718489294


   Solved by #2561 


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

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



[GitHub] [apisix] Miss-you commented on issue #2554: request help: abnormal output after using echo plugin

Posted by GitBox <gi...@apache.org>.
Miss-you commented on issue #2554:
URL: https://github.com/apache/apisix/issues/2554#issuecomment-719138194


   > @spacewander It seems that there is still a problem after I use your repaired version.
   > ![image](https://user-images.githubusercontent.com/8169665/97564777-0f209000-1a20-11eb-943d-26bb5a467706.png)
   
   The problem is that the clear_header_as_body_modified function is nil.
   
   I suggest you need to upgrade the apache apisix code, not just the `echo.lua` file!


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

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



[GitHub] [apisix] spacewander commented on issue #2554: request help: abnormal output after using echo plugin

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #2554:
URL: https://github.com/apache/apisix/issues/2554#issuecomment-718337888


   It is a known issue.
   > NOTE: echo plugin is written as an example. There are some unhandled cases and you should not use it in the production!
   
   https://github.com/apache/apisix/blob/master/doc/plugins/echo.md
   
   The plugin doesn't set Content-Length correctly.


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

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



[GitHub] [apisix] spacewander commented on issue #2554: request help: abnormal output after using echo plugin

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #2554:
URL: https://github.com/apache/apisix/issues/2554#issuecomment-719107301


   @thekingofworld 
   Because the fix depends on function introduced after 2.0.
   If the echo plugin is important to you, you should try the master branch.


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

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



[GitHub] [apisix] moonming commented on issue #2554: request help: abnormal output after using echo plugin

Posted by GitBox <gi...@apache.org>.
moonming commented on issue #2554:
URL: https://github.com/apache/apisix/issues/2554#issuecomment-718332935


   @thekingofworld Can you copy the text of the command line? The picture is not easy to debug


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

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



[GitHub] [apisix] thekingofworld commented on issue #2554: request help: abnormal output after using echo plugin

Posted by GitBox <gi...@apache.org>.
thekingofworld commented on issue #2554:
URL: https://github.com/apache/apisix/issues/2554#issuecomment-718334757


   @moonming OK, here is text
   ```
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "plugins": {
           "echo": {
               "before_body": "before the body modification "
           }
       },
       "upstream": {
           "nodes": {
               "127.0.0.1:8080": 1
           },
           "type": "roundrobin"
       },
       "uri": "/hello"
   }'
   ```


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

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



[GitHub] [apisix] thekingofworld edited a comment on issue #2554: request help: abnormal output after using echo plugin

Posted by GitBox <gi...@apache.org>.
thekingofworld edited a comment on issue #2554:
URL: https://github.com/apache/apisix/issues/2554#issuecomment-718339899






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

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



[GitHub] [apisix] thekingofworld commented on issue #2554: request help: abnormal output after using echo plugin

Posted by GitBox <gi...@apache.org>.
thekingofworld commented on issue #2554:
URL: https://github.com/apache/apisix/issues/2554#issuecomment-718336780


   the upstream `127.0.0.1:8080` is a simple http server, implemented through `Go` language
   ![image](https://user-images.githubusercontent.com/8169665/97522169-1755dc80-19da-11eb-8be2-46c9d1b87190.png)
   


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

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



[GitHub] [apisix] moonming commented on issue #2554: request help: abnormal output after using echo plugin

Posted by GitBox <gi...@apache.org>.
moonming commented on issue #2554:
URL: https://github.com/apache/apisix/issues/2554#issuecomment-718332608


   @Akayeshmantha do you have time to take a look? thx


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

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



[GitHub] [apisix] spacewander closed issue #2554: request help: abnormal output after using echo plugin

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #2554:
URL: https://github.com/apache/apisix/issues/2554


   


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

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