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 9165B25C5E for ; Tue, 23 Jul 2019 03:48:24 -0400 (EDT) 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 s2p-WmCgAccw for ; Tue, 23 Jul 2019 03:48:24 -0400 (EDT) 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 E46FC22CE1 for ; Tue, 23 Jul 2019 03:48:23 -0400 (EDT) Date: Tue, 23 Jul 2019 10:48:05 +0300 From: Alexander Turenko Subject: [tarantool-patches] Re: [PATCH] httpc: fix bug with segfault by wrong headers Message-ID: <20190723074805.y5ujfxnbyfnbf67r@tkn_work_nb> References: <20190616152409.18534-1-roman.habibov@tarantool.org> <20190624160423.ptng2eusy2osyyaj@tkn_work_nb> <01B8FFD0-AFA3-4821-AF68-2E17F08AF64A@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <01B8FFD0-AFA3-4821-AF68-2E17F08AF64A@tarantool.org> 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: Roman Khabibov Cc: tarantool-patches@freelists.org > +/** > + * Traverse headers in a Lua table and save them into 'struct > + * httpc_request'. > + * > + * @param L Lua stack. > + * @param req http request. > + * > + * @retval HEADERS_SUCCESS on success. > + * @retval HEADERS_BAD_HEADERS on 'bad headers' error. > + * @retval HEADERS_BAD_KEYS on 'bad keys' error. > + * @retval HEADERS_INTERNAL_ERR on internal error. > + */ > +static enum headers_status > +fill_outgoing_headers(struct lua_State *L, int idx, struct httpc_request *req) BTW, are we really need to extract this code into the function? As I see the change of the question can be done w/o increasing an indent level.