From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 3A6DE2415B for ; Tue, 29 Jan 2019 15:32:24 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CZRedhKzDvge for ; Tue, 29 Jan 2019 15:32:24 -0500 (EST) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id ECCD91FFB8 for ; Tue, 29 Jan 2019 15:32:23 -0500 (EST) Date: Tue, 29 Jan 2019 23:32:21 +0300 From: Alexander Turenko Subject: [tarantool-patches] Re: [PATCH] httpc: add checking of headers in httpc:request Message-ID: <20190129203221.xlfuavohmtcpql3k@tkn_work_nb> References: <20181221181844.4417-1-roman.habibov@tarantool.org> <20181223031929.hhmxdlsox2aon5ih@tkn_work_nb> <3b2626ce-b887-70dd-38b0-ef38b37a983c@tarantool.org> <72bbdfde-54d7-0e94-c5e7-ca84c2a6078d@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org, Roman > >          while (lua_next(L, -2) != 0) { > > +            int header_type = lua_type(L, -1); > > +            if (header_type != LUA_TSTRING) { > > 2. Why so complex instead of just lua_isstring()? It is not quite same. lua_isstring() accepts numbers as well as strings.