Skip to content

Commit 969504c

Browse files
committed
Merged
2 parents 902a38e + 8b553ad commit 969504c

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ Tarantool - https://hub.docker.com/r/tarantool/tarantool
3131
* v0.2.2 - Stable.
3232
* v2.3.1 - Production ready.
3333
* v2.3.2 - production ready.
34+
* v2.3.2 - Production ready.
35+
* v2.3.7 - Production ready.
36+
* v2.3.8-beta - Beta.
3437
* v2.4.0-beta - Stable, Beta.
3538

3639
## Content
@@ -114,7 +117,7 @@ make build-all # or 'build-all-debug' for debug version
114117

115118
NOTE: since v0.2.0
116119

117-
With this module, you can call Tarantool stored procedures via HTTP REST methods (GET, POST, PUT, DELETE)
120+
With this module, you can call Tarantool stored procedures via HTTP REST methods (GET, POST, PUT, PATCH, DELETE)
118121

119122
Example
120123
```nginx
@@ -124,10 +127,10 @@ make build-all # or 'build-all-debug' for debug version
124127
}
125128
126129
server {
127-
# HTTP [GET | POST | PUT | DELETE] /tnt_rest?q=1&q=2&q=3
130+
# HTTP [GET | POST | PUT | PATCH | DELETE] /tnt_rest?q=1&q=2&q=3
128131
location /tnt_rest {
129132
# REST mode on
130-
tnt_http_rest_methods get post put delete; # or all
133+
tnt_http_rest_methods get post put patch delete; # or all
131134
132135
# Pass http headers and uri
133136
tnt_pass_http_request on;
@@ -160,7 +163,7 @@ end
160163

161164
NOTE: since v0.1.4
162165

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

165168
Server HTTP statuses
166169

@@ -446,7 +449,7 @@ Specify that subrequest (i.e. `tnt_eval`) will be executed in memory.
446449

447450
tnt_http_methods
448451
----------------
449-
**syntax:** *tnt_http_methods post, put, delete, all*
452+
**syntax:** *tnt_http_methods post, put, patch, delete, all*
450453

451454
**default:** *post, delete*
452455

@@ -473,7 +476,7 @@ Example
473476

474477
tnt_http_rest_methods
475478
----------------
476-
**syntax:** *tnt_http_rest_methods get, post, put, delete, all*
479+
**syntax:** *tnt_http_rest_methods get, post, put, patch, delete, all*
477480

478481
**default:** *no*
479482

@@ -800,6 +803,5 @@ Client side javascript example: example/echo.html, example/echo.lua.
800803
[Back to content](#content)
801804

802805
================
803-
Please report bugs at https://github.com/tarantool/nginx_upstream_module/issues.
804-
805-
We also warmly welcome your feedback in the discussion mailing list, tarantool@googlegroups.com.
806+
* Please report bugs at https://github.com/tarantool/nginx_upstream_module/issues.
807+
* We also warmly welcome your feedback in the discussion mailing list, tarantool@googlegroups.com.

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
@@ -118,7 +118,7 @@ typedef struct {
118118
/** Set of allowed REST methods
119119
*/
120120
static const ngx_uint_t ngx_http_tnt_allowed_methods =
121-
(NGX_HTTP_POST|NGX_HTTP_GET|NGX_HTTP_PUT|NGX_HTTP_DELETE);
121+
(NGX_HTTP_POST|NGX_HTTP_GET|NGX_HTTP_PUT|NGX_HTTP_PATCH|NGX_HTTP_DELETE);
122122

123123
/** Upstream states
124124
*/

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

0 commit comments

Comments
 (0)