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 2021/11/05 11:07:10 UTC

[GitHub] [apisix] HaoTien opened a new issue #5430: bug: apisix/admin/init.lua:161,if curl -d 'false',return error

HaoTien opened a new issue #5430:
URL: https://github.com/apache/apisix/issues/5430


   ### Issue description
   
   use the cmd: curl http://localhost:9180/apisix/admin/routes/1/enable_websocket -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PATCH -i -d 'false'
   to modified attribute /admin/routes/1/enable_websocket;
   return 500,
   init.lua:162: handler(): invalid request body: false err: nil, client: 127.0.0.1, server: , request: "PATCH /apisix/admin/routes/1/enable_websocket HTTP/1.1", host: "localhost:9180"
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks --version`):
   
   
   ### Steps to reproduce
   
   1.# create one route
   $ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
       "uri": "/index.html",
       "hosts": ["foo.com", "*.bar.com"],
       "remote_addrs": ["127.0.0.0/8"],
       "methods": ["PUT", "GET"],
       "enable_websocket": true,
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "39.97.63.215:80": 1
           }
       }
   }'
   2.modified the attribute
   curl http://localhost:9180/apisix/admin/routes/1/enable_websocket -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PATCH -i -d 'false'
   3.return 500
   500 Internal Server Error
   
   ### Actual result
   
   <!DOCTYPE html>
   <html>
   <head>
   <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
   <meta content="utf-8" http-equiv="encoding">
   <title>500 Internal Server Error</title>
   <style>
       body {
           width: 35em;
           margin: 0 auto;
           font-family: Tahoma, Verdana, Arial, sans-serif;
       }
   </style>
   </head>
   <body>
   <h1>An error occurred.</h1>
   <p>You can report issue to <a href="https://github.com/apache/apisix/issues">APISIX</a></p>
   <p><em>Faithfully yours, <a href="https://apisix.apache.org/">APISIX</a>.</em></p>
   </body>
   </html>
   
   
   ### Error log
   
   init.lua:162: handler(): invalid request body: false err: nil, client: 127.0.0.1, server: , request: "PATCH /apisix/admin/routes/1/enable_websocket HTTP/1.1", host: "localhost:9180"
   
   ### Expected result
   
   PATCH return  201 Created
   the value(true) of key("enable_websocket") is modified  to false
   


-- 
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] tzssangglass edited a comment on issue #5430: bug: apisix/admin/init.lua:161,if curl -d 'false',return error

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


   what's your APISIX version? pls provide env info


-- 
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] tzssangglass commented on issue #5430: bug: apisix/admin/init.lua:161,if curl -d 'false',return error

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


   what's your APISIX version? pls provide env info?


-- 
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] tzssangglass commented on issue #5430: bug: apisix/admin/init.lua:161,if curl -d 'false',return error

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


   what's your APISIX version? pls provide env info?


-- 
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 closed issue #5430: bug: apisix/admin/init.lua:161,if curl -d 'false',return error

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


   


-- 
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] HaoTien commented on issue #5430: bug: apisix/admin/init.lua:161,if curl -d 'false',return error

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


   > what's your APISIX version? pls provide env info
   
   I have provided env info.


-- 
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] HaoTien commented on issue #5430: bug: apisix/admin/init.lua:161,if curl -d 'false',return error

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


   > what's your APISIX version? pls provide env info
   
   I have provided env info.


-- 
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] tzssangglass edited a comment on issue #5430: bug: apisix/admin/init.lua:161,if curl -d 'false',return error

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


   what's your APISIX version? pls provide env info


-- 
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] tzssangglass commented on issue #5430: bug: apisix/admin/init.lua:161,if curl -d 'false',return error

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


   what's your APISIX version? pls provide env info?


-- 
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] HaoTien commented on issue #5430: bug: apisix/admin/init.lua:161,if curl -d 'false',return error

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


   > what's your APISIX version? pls provide env info
   
   I have provided env info.


-- 
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] tzssangglass edited a comment on issue #5430: bug: apisix/admin/init.lua:161,if curl -d 'false',return error

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


   what's your APISIX version? pls provide env info


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