Colm MacCarthaigh wrote:
On Mon, Aug 08, 2005 at 03:24:44PM +0100, Colm MacCarthaigh wrote:

+ srequest = apr_pstrcat(p, "GET / HTTP/1.0\r\nUser-Agent: ", + ap_get_server_version(), + " (internal dummy connection)\r\n\r\n", NULL);

Shouldn't this string only be created once for the lifetime of the server? It seems like a wast of cycles and memory to alloc it each time.

maybe just make it static like:

static char *srequest = NULL;

if(!srequest) {
        srequest = /*do strcat stuff*/
}

or something along the same lines.


--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies

Reply via email to