Revision: 14459
Author: adrian.chadd
Date: Wed Mar 17 09:00:06 2010
Log: Extract out the internal URL construction
http://code.google.com/p/lusca-cache/source/detail?r=14459
Modified:
/branches/LUSCA_HEAD/src/client_side.c
=======================================
--- /branches/LUSCA_HEAD/src/client_side.c Tue Mar 16 08:34:56 2010
+++ /branches/LUSCA_HEAD/src/client_side.c Wed Mar 17 09:00:06 2010
@@ -2471,6 +2471,16 @@
}
return 1;
}
+
+static int
+parseHttpInternalRequest(ConnStateData *conn, clientHttpRequest *http,
const char *url)
+{
+ http->uri = xstrdup(internalStoreUri("", url));
+ http->flags.internal = 1;
+ http->flags.accel = 1;
+ debug(33, 5) ("INTERNAL REWRITE: '%s'\n", http->uri);
+ return 1;
+}
/*
* parseHttpRequest()
@@ -2584,11 +2594,7 @@
goto invalid_request;
} else if (*url == '/' && Config.onoff.global_internal_static &&
internalCheck(url)) {
internal:
- /* prepend our name & port */
- http->uri = xstrdup(internalStoreUri("", url));
- http->flags.internal = 1;
- http->flags.accel = 1;
- debug(33, 5) ("INTERNAL REWRITE: '%s'\n", http->uri);
+ (void) parseHttpInternalRequest(conn, http, url);
} else if (*url == '/' && conn->port->transparent) {
int port = 0;
const char *host = mime_get_header(req_hdr, "Host");
--
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en.