+
+ /*
+ * Downgrade http version from 1.1 to 1.0 if +downgrade
+ * action applies
+ */
+ if (!strcmpic(http->ver, "HTTP/1.1") && csp->action->flags & ACTION_DOWNGRADE)
+ {
+ freez(http->ver);
+ http->ver = strdup("HTTP/1.0");
+ }
+
+ /*
+ * (Re)build the HTTP request. If forwarding, use the whole URL,
+ * else, use only the path.
+ */
+ if (http->ssl == 0)
+ {
+ freez(http->cmd);
+
+ http->cmd = strsav(http->cmd, http->gpc);
+ http->cmd = strsav(http->cmd, " ");
+
+ if (fwd->forward_host)
+ {
+ http->cmd = strsav(http->cmd, http->url);
+ }
+ else
+ {
+ http->cmd = strsav(http->cmd, http->path);
+ }
+
+ http->cmd = strsav(http->cmd, " ");
+ http->cmd = strsav(http->cmd, http->ver);
+
+ enlist(csp->headers, http->cmd);
+ }
+
+