Project

General

Profile

Feature #1737 ยป patch-lighty-mod_evhost-fqdn-pathpattern.sanitize-data.diff

-- tickets - Anonymous, 2008-08-01 12:11

View differences:

src/mod_evhost.c 2008-08-01 11:55:58.000000000 +0000
if (*(ptr+1) == '%') {
/* %% */
BUFFER_APPEND_STRING_CONST(p->tmp_buf,"%");
} else if (*(ptr+1) == '_' ) {
/* %_ == full hostname */
char *colon = strchr(con->uri.authority->ptr, ':');
if(colon == NULL) {
buffer_append_string_buffer(p->tmp_buf,con->uri.authority); // adds fqdn
} else {
/* strip the port out of the authority-part of the URI scheme (username:password is not stored in request_uri.authority) */
buffer *tmp_hostbuf = buffer_init();
buffer_copy_string_len(tmp_hostbuf,con->uri.authority->ptr,colon - con->uri.authority->ptr);
buffer_append_string_buffer(p->tmp_buf,tmp_hostbuf);
buffer_free(tmp_hostbuf);
}
} else if (NULL != (ds = (data_string *)array_get_element(parsed_host,p->conf.path_pieces[i]->ptr))) {
if (ds->value->used) {
buffer_append_string_buffer(p->tmp_buf,ds->value);
    (1-1/1)