+ /*
+ * Handle full URLs in the request line...
+ */
+
+ if (con->uri[0] != '/')
+ {
+ char method[HTTP_MAX_URI], /* Method/scheme */
+ userpass[HTTP_MAX_URI], /* Username:password */
+ hostname[HTTP_MAX_URI], /* Hostname */
+ resource[HTTP_MAX_URI]; /* Resource path */
+ int port; /* Port number */
+
+
+ /*
+ * Separate the URI into its components...
+ */
+
+ httpSeparate(con->uri, method, userpass, hostname, &port, resource);
+
+ /*
+ * Only allow URIs with the servername, localhost, or an IP
+ * address...
+ */
+
+ if (strcasecmp(hostname, ServerName) &&
+ strcasecmp(hostname, "localhost") &&
+ !isdigit(hostname[0]))
+ {
+ /*
+ * Nope, we don't do proxies...
+ */
+
+ LogMessage(L_ERROR, "Bad URI \"%s\" in request!", con->uri);
+ SendError(con, HTTP_METHOD_NOT_ALLOWED);
+ ShutdownClient(con);
+ return (1);
+ }
+
+ /*
+ * Copy the resource portion back into the URI; both resource and
+ * con->uri are HTTP_MAX_URI bytes in size...
+ */
+
+ strcpy(con->uri, resource);
+ }
+