tarantool / nginx_upstream_module

Tarantool NginX upstream module (REST, JSON API, websockets, load balancing)
Other
174 stars 18 forks source link

Delete("#") operation in tnt_update causes error #111

Closed ja1cap closed 6 years ago

ja1cap commented 6 years ago

Nginx config

  location /update {
    tnt_update 514 "key=%ks" "value=%n";
    tnt_pass tnt;
  }

Send request /update?key=test_inc&value=%23,3,1, response

{"error":{"code":400,"message":"'value=' is invalid. Operation type is expecting"}}
dedok commented 6 years ago

Hi,

I guess you did url encoding twice.

Also I did update README.md, and I did write examples in f857bfb1af6535371a2f2b77ff0b1ac6c24e0a52: https://github.com/tarantool/nginx_upstream_module/blob/master/examples/simple_rest_client.sh -- here is using urlencoding

https://github.com/tarantool/nginx_upstream_module/blob/master/examples/simple_rest_client.py -- here isn't using url encoding, since urlib2 has this feature.