Graham Leggett wrote:
Brett Hutley wrote:
Yup. Note that the way 2.0.40 handles this, it strdups WHATEVER is pushed through afterwards to the status_line member of the request_rec structure.
Looking at this, it does this:
r->status_line = apr_pstrdup(p, &buffer[9]);
apr_pstrdup is not strdup as far as I am aware. Can someone check this for me?
Function is in apr_strings.c
Kinda works like strdup() as far as I can see... (although I guess with a memory pool)...
APR_DECLARE(char *) apr_pstrdup(apr_pool_t *a, const char *s) { char *res; apr_size_t len;
if (s == NULL) { return NULL; } len = strlen(s) + 1; res = apr_palloc(a, len); memcpy(res, s, len); return res; }