}
}
+/*
+ *
+ */
+#if ENABLE_TRACE
+static void
+dump_request(http_connection_t *hc)
+{
+ char buf[2048] = "";
+ http_arg_t *ra;
+ int first;
+
+ first = 1;
+ TAILQ_FOREACH(ra, &hc->hc_req_args, link) {
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), first ? "?%s=%s" : "&%s=%s", ra->key, ra->val);
+ first = 0;
+ }
+
+ first = 1;
+ TAILQ_FOREACH(ra, &hc->hc_args, link) {
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), first ? "{{%s=%s" : ",%s=%s", ra->key, ra->val);
+ first = 0;
+ }
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "}}");
+
+ tvhtrace("http", "%s%s", hc->hc_url, buf);
+}
+#else
+static inline void
+dump_request(http_connection_t *hc)
+{
+}
+#endif
+
/**
* Process a request, extract info from headers, dispatch command and
* clean up
char *v, *argv[2];
int n, rval = -1;
uint8_t authbuf[150];
+
+ dump_request(hc);
hc->hc_url_orig = tvh_strdupa(hc->hc_url);
ra->val = strdup(val);
}
-
/*
* Split a string in components delimited by 'delimiter'
*/