From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 7 Mar 2019 17:53:28 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] Re: [PATCH v1 1/1] http: fix httpc auto-managed headers Message-ID: <20190307145328.ublvmnnyxvowgxl3@esperanza> References: <9099f8a339c278e3a5dac683923d13c7ee470ce9.1550761676.git.kshcherbatov@tarantool.org> <80130a1b-84ad-5f90-9422-95bb0a1e67cb@tarantool.org> <998b800b-acc1-f0c8-1fd3-322d0c04f657@tarantool.org> <20190307135135.dner6r66szejw6lx@esperanza> <22400748-d82b-16ab-5809-68440cbfb1ef@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22400748-d82b-16ab-5809-68440cbfb1ef@tarantool.org> To: Kirill Shcherbatov Cc: tarantool-patches@freelists.org List-ID: On Thu, Mar 07, 2019 at 05:48:20PM +0300, Kirill Shcherbatov wrote: > > I don't like how httpc internal API now looks like: one should set > > headers before the method/url and keepalive options, otherwise he/she > > risks loosing them. And there isn't a word about this idiosyncrasy > > anywhere in the comments. > > > > Also, splitting request construction into allocation (_new) and > > method/url initialization (_set_url) looks ugly to me, because no > > request makes sense without them. > > > > May be, we could set default headers in httpc_execute instead? > No, when those headers are set, they use specific context: like size, idle etx. You can store them in httpc_request, can't you?