* Most tests work with HTTP/2 support using nghttp2

* except non-ssl http/1->/2 upgrade
* Restconf: ensure HEAD method works everywhere GET does.
This commit is contained in:
Olof hagsand 2021-06-08 20:53:43 +02:00
parent b680e3c5ac
commit 84f5762ab5
59 changed files with 1683 additions and 1107 deletions

View file

@ -304,7 +304,7 @@ restconf_stream(clicon_handle h,
goto done;
if (restconf_reply_header(req, "X-Accel-Buffering", "no") < 0)
goto done;
if (restconf_reply_send(req, 201, NULL) < 0)
if (restconf_reply_send(req, 201, NULL, 0) < 0)
goto done;
*sp = s;
ok:
@ -378,7 +378,7 @@ api_stream(clicon_handle h,
{
int retval = -1;
FCGX_Request *rfcgi = (FCGX_Request *)req; /* XXX */
char *path;
char *path = NULL;
char *method;
char **pvec = NULL;
int pn;
@ -397,7 +397,8 @@ api_stream(clicon_handle h,
#endif
clicon_debug(1, "%s", __FUNCTION__);
path = restconf_uripath(h);
if ((path = restconf_uripath(h)) == NULL)
goto done;
/* XXX see restconf_config_init access directly */
pretty = clicon_option_bool(h, "CLICON_RESTCONF_PRETTY");
if ((pvec = clicon_strsep(path, "/", &pn)) == NULL)
@ -521,5 +522,7 @@ api_stream(clicon_handle h,
cbuf_free(cb);
if (cbret)
cbuf_free(cbret);
if (path)
free(path);
return retval;
}