fielding 98/10/09 17:40:08
Modified: src CHANGES src/main util.c Log: Minor performance improvement to ap_escape_html(), since we already calculate the string length. It occurs to me that we could do a lot better by having a separate interface for "just give me a pointer to my own string if nothing needs to be escaped". This routine is mostly used in buffer send situations, so the extra copy is frequently just a waste of memory. Revision Changes Path 1.1107 +2 -0 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1106 retrieving revision 1.1107 diff -u -r1.1106 -r1.1107 --- CHANGES 1998/10/09 17:42:15 1.1106 +++ CHANGES 1998/10/10 00:40:04 1.1107 @@ -1,5 +1,7 @@ Changes with Apache 1.3.4 + *) Minor performance improvement to ap_escape_html(). [Roy Fielding] + *) Fixed a segmentation violation in mod_proxy when a response is non-cachable. [Roy Fielding, traced by Doug Bloebaum]. PR#2950, 3056 1.135 +2 -1 apache-1.3/src/main/util.c Index: util.c =================================================================== RCS file: /home/cvs/apache-1.3/src/main/util.c,v retrieving revision 1.134 retrieving revision 1.135 diff -u -r1.134 -r1.135 --- util.c 1998/09/25 23:01:49 1.134 +++ util.c 1998/10/10 00:40:07 1.135 @@ -1251,7 +1251,8 @@ j += 4; if (j == 0) - return ap_pstrdup(p, s); + return ap_pstrndup(p, s, i); + x = ap_palloc(p, i + j + 1); for (i = 0, j = 0; s[i] != '\0'; i++, j++) if (s[i] == '<') {