From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Kirill Shcherbatov <kshcherbatov@tarantool.org>,
tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH v1 1/1] http: fix httpc auto-managed headers
Date: Thu, 7 Mar 2019 17:07:29 +0300 [thread overview]
Message-ID: <53210653-ccfc-c94f-fdb7-b932d5a9db9a@tarantool.org> (raw)
In-Reply-To: <998b800b-acc1-f0c8-1fd3-322d0c04f657@tarantool.org>
Hi! Thanks for the patch. Please,
apply the diff below and then LGTM.
diff --git a/src/httpc.c b/src/httpc.c
index 96740f950..060cacb48 100644
--- a/src/httpc.c
+++ b/src/httpc.c
@@ -113,9 +113,7 @@ httpc_request_new(struct httpc_env *env)
mempool_free(&env->req_pool, req);
return NULL;
}
-
ibuf_create(&req->body, &cord()->slabc, 1);
-
return req;
}
@@ -178,14 +176,13 @@ httpc_request_delete(struct httpc_request *req)
* Update bitmask of the http request headers that httpc may set
* automatically. In case of reserved pattern is found in header,
* routine sets corresponding bit in auto_headers_mask.
- * Returns -1 when header is reserved and it's bit is already set
- * in auto_headers_mask; 0 otherwise,
- * @param auto_headers_mask The bitmask of httpc-auto-managed
- * headers to pointer.
- * @param header The HTTP header string.
- * @retval 0 When specified header is not auto-managed or when
- * corresponding bit was not set in auto_headers_mask.
- * @retval -1 otherwise.
+ * @param auto_headers_mask A bitmask of httpc-auto-managed
+ * headers to pointer.
+ * @param header A HTTP header string.
+ *
+ * @retval 0 Specified header is not auto-managed or
+ * corresponding bit was not set in auto_headers_mask.
+ * @retval -1 Otherwise.
*/
static int
httpc_set_header_bit(uint8_t *auto_headers_mask, const char *header)
@@ -196,7 +193,7 @@ httpc_set_header_bit(uint8_t *auto_headers_mask, const char *header)
* to be formated with "%s: %s" pattern, so direct size
* verification is redundant.
*/
- struct {
+ static struct {
const char *name;
int len;
} managed_headers[] = {
diff --git a/src/httpc.h b/src/httpc.h
index dc18ffb69..361af57e1 100644
--- a/src/httpc.h
+++ b/src/httpc.h
@@ -120,7 +120,7 @@ struct httpc_request {
/**
* @brief Create a new HTTP request
- * @param env - HTTP client environment.
+ * @param env HTTP client environment.
* @return a new HTTP request object
*/
struct httpc_request *
prev parent reply other threads:[~2019-03-07 14:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 15:09 [tarantool-patches] " Kirill Shcherbatov
2019-02-22 7:39 ` [tarantool-patches] " Kirill Shcherbatov
2019-02-25 7:52 ` Kirill Shcherbatov
2019-02-25 14:17 ` Vladislav Shpilevoy
2019-02-25 15:21 ` Kirill Shcherbatov
2019-03-07 13:51 ` Vladimir Davydov
2019-03-07 14:07 ` Kirill Shcherbatov
2019-03-07 14:32 ` Vladimir Davydov
2019-03-07 14:48 ` Kirill Shcherbatov
2019-03-07 14:53 ` Vladimir Davydov
2019-03-11 9:23 ` [tarantool-patches] Re: [PATCH v2 " Kirill Shcherbatov
2019-03-11 10:02 ` Vladimir Davydov
2019-03-11 15:57 ` Kirill Shcherbatov
2019-03-12 8:54 ` Vladimir Davydov
2019-03-07 14:07 ` Vladislav Shpilevoy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53210653-ccfc-c94f-fdb7-b932d5a9db9a@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=kshcherbatov@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH v1 1/1] http: fix httpc auto-managed headers' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox