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/11/23 16:54:30 UTC

[GitHub] [apisix] Firstsawyou edited a comment on issue #2823: feat(hmac-auth): the request parameter participating in the signature can be the parameter name

Firstsawyou edited a comment on issue #2823:
URL: https://github.com/apache/apisix/issues/2823#issuecomment-731993357


   > Agreed. We may keep consistent with `ngx.req.get_uri_args`?, i.e. args without `=<value>` should be treated boolean, and value of args like `key=` should be treated as empty string, for instance, `GET /t?foo=&bar` will get args:
   > 
   > ```
   > foo:
   > bar: true
   > ```
   
   I think that when args without `=<value>`, it should be treated as nil. Because in most programming languages, when args without `=<value`, it is treated as empty string. In this way, the `hmac-auth` plugin can be compatible with args without `=<value>`.
   
   for instance, `GET /t?foo=&bar` will get args:
   ```
   foo:
   bar: 
   ```
   


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