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/06/13 23:23:37 UTC

[GitHub] [incubator-apisix] sshniro opened a new issue #1710: bug: Invalid JSON encoding when exporting logs with method body

sshniro opened a new issue #1710:
URL: https://github.com/apache/incubator-apisix/issues/1710


   ### Issue description
   If the method body contains JSON, then while exporting via loggers it results in invalid encoding.
   
   ```shell
   curl http://127.0.0.2:9080/get --data '{"sample_payload":"hello"}'
   ```
   
   ```json
   {
   "upstream":"52.54.214.244:443",
   "body":"{\\"sample_payload\\":\\"hello\\"}","method":"POST"}, -- wrong encoding
   }
   ```
   
   ### Fix
   Encode the method body before appending to the log message.
   


----------------------------------------------------------------
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] [incubator-apisix] moonming commented on issue #1710: bug: Invalid JSON encoding when exporting logs with method body

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


   thanks.
   welcome PR.


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