Skip to content

Commit 8b553ad

Browse files
committed
Add PATCH method, bump 2.3.8
1 parent 375c0b7 commit 8b553ad

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Tarantool - https://hub.docker.com/r/tarantool/tarantool
2828
* v2.3.1 - Production ready.
2929
* v2.3.2 - Production ready.
3030
* v2.3.7 - Production ready.
31+
* v2.3.8 - Beta.
3132

3233
## Content
3334
----------
@@ -107,7 +108,7 @@ make build-all # or 'build-all-debug' for debug version
107108

108109
NOTE: since v0.2.0
109110

110-
With this module, you can call Tarantool stored procedures via HTTP REST methods (GET, POST, PUT, DELETE)
111+
With this module, you can call Tarantool stored procedures via HTTP REST methods (GET, POST, PUT, PATCH, DELETE)
111112

112113
Example
113114
```nginx
@@ -117,10 +118,10 @@ make build-all # or 'build-all-debug' for debug version
117118
}
118119
119120
server {
120-
# HTTP [GET | POST | PUT | DELETE] /tnt_rest?q=1&q=2&q=3
121+
# HTTP [GET | POST | PUT | PATCH | DELETE] /tnt_rest?q=1&q=2&q=3
121122
location /tnt_rest {
122123
# REST mode on
123-
tnt_http_rest_methods get post put delete; # or all
124+
tnt_http_rest_methods get post put patch delete; # or all
124125
125126
# Pass http headers and uri
126127
tnt_pass_http_request on;
@@ -153,7 +154,7 @@ end
153154

154155
NOTE: since v0.1.4
155156

156-
The module expects JSON posted with HTTP POST or PUT (since v0.2.0) and carried in request body.
157+
The module expects JSON posted with HTTP POST, PUT (since v0.2.0), or PATCH (since v2.3.8) and carried in request body.
157158

158159
Server HTTP statuses
159160

@@ -309,7 +310,7 @@ Specify the Tarantool server backend.
309310

310311
tnt_http_methods
311312
----------------
312-
**syntax:** *tnt_http_methods post, put, delete, all*
313+
**syntax:** *tnt_http_methods post, put, patch, delete, all*
313314

314315
**default:** *post, delete*
315316

@@ -336,7 +337,7 @@ Example
336337

337338
tnt_http_rest_methods
338339
----------------
339-
**syntax:** *tnt_http_rest_methods get, post, put, delete, all*
340+
**syntax:** *tnt_http_rest_methods get, post, put, patch, delete, all*
340341

341342
**default:** *no*
342343

src/ngx_http_tnt_handlers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ ngx_http_tnt_query_handler(ngx_http_request_t *r)
917917
out_chain->buf->last_in_chain = 1;
918918

919919
/**
920-
* Conv. GET/PUT/DELETE to Tarantool message [
920+
* Conv. GET/PUT/PATCH/DELETE to Tarantool message [
921921
*/
922922
buf = out_chain->buf;
923923
tp_init(&tp, (char *)buf->start, buf->end - buf->start, NULL, NULL);

src/ngx_http_tnt_handlers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ typedef struct {
133133
/** Set of allowed REST methods
134134
*/
135135
static const ngx_uint_t ngx_http_tnt_allowed_methods =
136-
(NGX_HTTP_POST|NGX_HTTP_GET|NGX_HTTP_PUT|NGX_HTTP_DELETE);
136+
(NGX_HTTP_POST|NGX_HTTP_GET|NGX_HTTP_PUT|NGX_HTTP_PATCH|NGX_HTTP_DELETE);
137137

138138
/** Upstream states
139139
*/

src/ngx_http_tnt_module.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@ static ngx_conf_bitmask_t ngx_http_tnt_methods[] = {
101101
{ ngx_string("get"), NGX_HTTP_GET },
102102
{ ngx_string("post"), NGX_HTTP_POST },
103103
{ ngx_string("put"), NGX_HTTP_PUT },
104+
{ ngx_string("patch"), NGX_HTTP_PATCH },
104105
{ ngx_string("delete"), NGX_HTTP_DELETE },
105106
{ ngx_string("all"), (NGX_CONF_BITMASK_SET
106107
|NGX_HTTP_GET
107108
|NGX_HTTP_POST
108109
|NGX_HTTP_PUT
110+
|NGX_HTTP_PATCH
109111
|NGX_HTTP_DELETE) },
110112
{ ngx_null_string, 0 }
111113
};

src/ngx_http_tnt_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
#ifndef NGX_HTTP_TNT_VERSION_H
3434
#define NGX_HTTP_TNT_VERSION_H 1
3535

36-
#define NGX_HTTP_TNT_MODULE_VERSION_STRING "v2.3.7"
36+
#define NGX_HTTP_TNT_MODULE_VERSION_STRING "v2.3.8"
3737

3838
#endif

0 commit comments

Comments
 (0)