This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 7949059ec2891f65e2db398158a9a244f1faea8c Author: YAMAMOTO Takashi <yamam...@midokura.com> AuthorDate: Mon Mar 7 09:29:55 2022 +0900 webclient: Send HTTP 1.1 request if enabled --- netutils/webclient/webclient.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c index df1cd8f..5b07bac 100644 --- a/netutils/webclient/webclient.c +++ b/netutils/webclient/webclient.c @@ -1120,7 +1120,21 @@ int webclient_perform(FAR struct webclient_context *ctx) #endif dest = append(dest, ep, " "); - dest = append(dest, ep, g_http10); + if (ctx->protocol_version == WEBCLIENT_PROTOCOL_VERSION_HTTP_1_0) + { + dest = append(dest, ep, g_http10); + } + else if (ctx->protocol_version == + WEBCLIENT_PROTOCOL_VERSION_HTTP_1_1) + { + dest = append(dest, ep, g_http11); + } + else + { + ret = -EINVAL; + goto errout_with_errno; + } + dest = append(dest, ep, g_httpcrnl); dest = append(dest, ep, g_httphost); dest = append(dest, ep, ws->hostname);