As mentioned a month or two ago there were some implicit assumptions that
the values in content_type, handler, content_encoding, ... were lowercase. I'm not referring to mod_negotiation here -- there were other cases where strcmp() was being used. But in addition, mod_negotiation could be convinced to call str_tolower() on r->content_language(s), which could possibly modify a "read-only" string... which wastes at least one memory page per child. Clean all that up by declaring that the content fields in request_rec (and related fields elsewhere) must be lowercase, and must not be modified in place. Naturally I chose this because it's more efficient... rather than going around needlessly pstrdup()ing and strcasecmp()ing everywhere. There are a few other tweaks in here I couldn't resist, along the lines of getting rid of unneeded pstrdup()s. Plus a new function set_string_slot_lower(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@80482 13f79535-47bb-0310-9956-ffa450edef68
parent
c72c8302
Please register or sign in to comment