httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rasmus Lerdorf <>
Subject Re: A couple of Apache architecture questions
Date Fri, 18 Sep 1998 18:49:17 GMT
> I was looking at the ap_table_get() function and noticed that the internal
> structure of Apache tables appears to be a calloced array.  I'm familiar 
> with Netscape architecture, and they use hash tables for storing all the 
> header and such.  This makes it easier on the module programmer and faster 
> for doing indexed lookups on strings, etc.
> So, here's the question:  Is there a specific reason why Apache does not
> implement hash tables for the table structures?

You probably have a point on the speed issue, but I fail to see how it
would be easier with a hash table.  ap_table_get() looks like a hashed
lookup to a module programmer.  


   content_type = table_get(r->subprocess_env, "CONTENT_TYPE");

> Netscape provides a function called pblock_str2pblock() which takes a
> string like "name=value name=value" and converts it into a pblock (hashtable).
> Does Apache have a similar function, for converting query strings into tables?

No, there is no such function.  I think this is a very module-specific
thing.  I don't see how a general-purpose function could be written that
would be useful to more than a handful of modules.


View raw message