Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] httpc: consider "verbose" option correctly
@ 2019-12-07 13:10 olegrok
  2019-12-07 13:35 ` Sergey Ostanevich
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: olegrok @ 2019-12-07 13:10 UTC (permalink / raw)
  To: tarantool-patches; +Cc: Oleg Babin

From: Oleg Babin <babinoleg@mail.ru>

Before this patch if user passed {verbose = false}
to http client it was considered as "true"

This patch fixes such behaviour and takes into account
user's value
---
 src/lua/httpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lua/httpc.c b/src/lua/httpc.c
index a8e3e2525..4d703d711 100644
--- a/src/lua/httpc.c
+++ b/src/lua/httpc.c
@@ -302,7 +302,7 @@ luaT_httpc_request(lua_State *L)
 
 	lua_getfield(L, 5, "verbose");
 	if (!lua_isnil(L, -1) && lua_isboolean(L, -1))
-		httpc_set_verbose(req, true);
+		httpc_set_verbose(req, lua_toboolean(L, -1));
 	lua_pop(L, 1);
 
 	lua_getfield(L, 5, "interface");
-- 
2.23.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Tarantool-patches] [PATCH] httpc: consider "verbose" option correctly
  2019-12-07 13:10 [Tarantool-patches] [PATCH] httpc: consider "verbose" option correctly olegrok
@ 2019-12-07 13:35 ` Sergey Ostanevich
  2019-12-10 15:35 ` Alexander Turenko
  2019-12-19  8:12 ` Kirill Yukhin
  2 siblings, 0 replies; 4+ messages in thread
From: Sergey Ostanevich @ 2019-12-07 13:35 UTC (permalink / raw)
  To: olegrok; +Cc: Oleg Babin, tarantool-patches

[-- Attachment #1: Type: text/plain, Size: 847 bytes --]


LGTM

Best regards,
Sergos 

Saturday, 7 December 2019, 16:10 +0300 from olegrok@tarantool.org  <olegrok@tarantool.org>:
>From: Oleg Babin < babinoleg@mail.ru >
>
>Before this patch if user passed {verbose = false}
>to http client it was considered as "true"
>
>This patch fixes such behaviour and takes into account
>user's value
>---
> src/lua/httpc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/src/lua/httpc.c b/src/lua/httpc.c
>index a8e3e2525..4d703d711 100644
>--- a/src/lua/httpc.c
>+++ b/src/lua/httpc.c
>@@ -302,7 +302,7 @@ luaT_httpc_request(lua_State *L)
> 
> 	lua_getfield(L, 5, "verbose");
> 	if (!lua_isnil(L, -1) && lua_isboolean(L, -1))
>-		httpc_set_verbose(req, true);
>+		httpc_set_verbose(req, lua_toboolean(L, -1));
> 	lua_pop(L, 1);
> 
> 	lua_getfield(L, 5, "interface");
>-- 
>2.23.0
>

[-- Attachment #2: Type: text/html, Size: 3016 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Tarantool-patches] [PATCH] httpc: consider "verbose" option correctly
  2019-12-07 13:10 [Tarantool-patches] [PATCH] httpc: consider "verbose" option correctly olegrok
  2019-12-07 13:35 ` Sergey Ostanevich
@ 2019-12-10 15:35 ` Alexander Turenko
  2019-12-19  8:12 ` Kirill Yukhin
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Turenko @ 2019-12-10 15:35 UTC (permalink / raw)
  To: Oleg Babin; +Cc: Oleg Babin, tarantool-patches

LGTM.

CCed Kirill.

Kirill, this is the bugfix: please, push to all alive long-term
branches.

WBR, Alexander Turenko.

On Sat, Dec 07, 2019 at 04:10:14PM +0300, olegrok@tarantool.org wrote:
> From: Oleg Babin <babinoleg@mail.ru>
> 
> Before this patch if user passed {verbose = false}
> to http client it was considered as "true"
> 
> This patch fixes such behaviour and takes into account
> user's value

Nit: no periods at end of sentences.

> ---
>  src/lua/httpc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/lua/httpc.c b/src/lua/httpc.c
> index a8e3e2525..4d703d711 100644
> --- a/src/lua/httpc.c
> +++ b/src/lua/httpc.c
> @@ -302,7 +302,7 @@ luaT_httpc_request(lua_State *L)
>  
>  	lua_getfield(L, 5, "verbose");
>  	if (!lua_isnil(L, -1) && lua_isboolean(L, -1))
> -		httpc_set_verbose(req, true);
> +		httpc_set_verbose(req, lua_toboolean(L, -1));
>  	lua_pop(L, 1);
>  
>  	lua_getfield(L, 5, "interface");
> -- 
> 2.23.0
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Tarantool-patches] [PATCH] httpc: consider "verbose" option correctly
  2019-12-07 13:10 [Tarantool-patches] [PATCH] httpc: consider "verbose" option correctly olegrok
  2019-12-07 13:35 ` Sergey Ostanevich
  2019-12-10 15:35 ` Alexander Turenko
@ 2019-12-19  8:12 ` Kirill Yukhin
  2 siblings, 0 replies; 4+ messages in thread
From: Kirill Yukhin @ 2019-12-19  8:12 UTC (permalink / raw)
  To: olegrok; +Cc: Oleg Babin, tarantool-patches

Hello,

On 07 дек 16:10, olegrok@tarantool.org wrote:
> From: Oleg Babin <babinoleg@mail.ru>
> 
> Before this patch if user passed {verbose = false}
> to http client it was considered as "true"
> 
> This patch fixes such behaviour and takes into account
> user's value

I've checked your patch into 1.10, 2.2 and master.

--
Regards, Kirill Yukhin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-19  8:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-07 13:10 [Tarantool-patches] [PATCH] httpc: consider "verbose" option correctly olegrok
2019-12-07 13:35 ` Sergey Ostanevich
2019-12-10 15:35 ` Alexander Turenko
2019-12-19  8:12 ` Kirill Yukhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox