mod-xhtml-neg-cvs Mailing List for XHTML negotiation module (Page 3)
Brought to you by:
run2000
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
(51) |
Apr
(37) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ru...@us...> - 2004-03-30 10:47:23
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30125 Modified Files: Doxyfile Makefile mod_xhtml_neg.c Added Files: lookupa.c lookupa.h Log Message: Use a better hashing algorithm for generating using ETag suffix. --- NEW FILE: lookupa.c --- /* -------------------------------------------------------------------- lookupa.c, by Bob Jenkins, December 1996. Same as lookup2.c Use this code however you wish. Public Domain. No warranty. Source is http://burtleburtle.net/bob/c/lookupa.c -------------------------------------------------------------------- */ #ifndef LOOKUPA #include "lookupa.h" #endif /* -------------------------------------------------------------------- mix -- mix 3 32-bit values reversibly. For every delta with one or two bit set, and the deltas of all three high bits or all three low bits, whether the original value of a,b,c is almost all zero or is uniformly distributed, * If mix() is run forward or backward, at least 32 bits in a,b,c have at least 1/4 probability of changing. * If mix() is run forward, every bit of c will change between 1/3 and 2/3 of the time. (Well, 22/100 and 78/100 for some 2-bit deltas.) mix() was built out of 36 single-cycle latency instructions in a structure that could supported 2x parallelism, like so: a -= b; a -= c; x = (c>>13); b -= c; a ^= x; b -= a; x = (a<<8); c -= a; b ^= x; c -= b; x = (b>>13); ... Unfortunately, superscalar Pentiums and Sparcs can't take advantage of that parallelism. They've also turned some of those single-cycle latency instructions into multi-cycle latency instructions. Still, this is the fastest good hash I could find. There were about 2^^68 to choose from. I only looked at a billion or so. -------------------------------------------------------------------- */ #define mix(a,b,c) \ { \ a -= b; a -= c; a ^= (c>>13); \ b -= c; b -= a; b ^= (a<<8); \ c -= a; c -= b; c ^= (b>>13); \ a -= b; a -= c; a ^= (c>>12); \ b -= c; b -= a; b ^= (a<<16); \ c -= a; c -= b; c ^= (b>>5); \ a -= b; a -= c; a ^= (c>>3); \ b -= c; b -= a; b ^= (a<<10); \ c -= a; c -= b; c ^= (b>>15); \ } /* -------------------------------------------------------------------- lookup() -- hash a variable-length key into a 32-bit value k : the key (the unaligned variable-length array of bytes) len : the length of the key, counting by bytes level : can be any 4-byte value Returns a 32-bit value. Every bit of the key affects every bit of the return value. Every 1-bit and 2-bit delta achieves avalanche. About 6len+35 instructions. The best hash table sizes are powers of 2. There is no need to do mod a prime (mod is sooo slow!). If you need less than 32 bits, use a bitmask. For example, if you need only 10 bits, do h = (h & hashmask(10)); In which case, the hash table should have hashsize(10) elements. If you are hashing n strings (ub1 **)k, do it like this: for (i=0, h=0; i<n; ++i) h = lookup( k[i], len[i], h); By Bob Jenkins, 1996. bob...@bu.... You may use this code any way you wish, private, educational, or commercial. See http://burtleburtle.net/bob/hash/evahash.html Use for hash table lookup, or anything where one collision in 2^32 is acceptable. Do NOT use for cryptographic purposes. -------------------------------------------------------------------- */ ub4 lookup( register ub1 *k, register ub4 length, register ub4 level ) { register ub4 a,b,c,len; /* Set up the internal state */ len = length; a = b = 0x9e3779b9; /* the golden ratio; an arbitrary value */ c = level; /* the previous hash value */ /*---------------------------------------- handle most of the key */ while (len >= 12) { a += (k[0] +((ub4)k[1]<<8) +((ub4)k[2]<<16) +((ub4)k[3]<<24)); b += (k[4] +((ub4)k[5]<<8) +((ub4)k[6]<<16) +((ub4)k[7]<<24)); c += (k[8] +((ub4)k[9]<<8) +((ub4)k[10]<<16)+((ub4)k[11]<<24)); mix(a,b,c); k += 12; len -= 12; } /*------------------------------------- handle the last 11 bytes */ c += length; switch(len) /* all the case statements fall through */ { case 11: c+=((ub4)k[10]<<24); case 10: c+=((ub4)k[9]<<16); case 9 : c+=((ub4)k[8]<<8); /* the first byte of c is reserved for the length */ case 8 : b+=((ub4)k[7]<<24); case 7 : b+=((ub4)k[6]<<16); case 6 : b+=((ub4)k[5]<<8); case 5 : b+=k[4]; case 4 : a+=((ub4)k[3]<<24); case 3 : a+=((ub4)k[2]<<16); case 2 : a+=((ub4)k[1]<<8); case 1 : a+=k[0]; /* case 0: nothing left to add */ } mix(a,b,c); /*-------------------------------------------- report the result */ return c; } /* -------------------------------------------------------------------- mixc -- mixc 8 4-bit values as quickly and thoroughly as possible. Repeating mix() three times achieves avalanche. Repeating mix() four times eliminates all funnels and all characteristics stronger than 2^{-11}. -------------------------------------------------------------------- */ #define mixc(a,b,c,d,e,f,g,h) \ { \ a^=b<<11; d+=a; b+=c; \ b^=c>>2; e+=b; c+=d; \ c^=d<<8; f+=c; d+=e; \ d^=e>>16; g+=d; e+=f; \ e^=f<<10; h+=e; f+=g; \ f^=g>>4; a+=f; g+=h; \ g^=h<<8; b+=g; h+=a; \ h^=a>>9; c+=h; a+=b; \ } /* -------------------------------------------------------------------- checksum() -- hash a variable-length key into a 256-bit value k : the key (the unaligned variable-length array of bytes) len : the length of the key, counting by bytes state : an array of CHECKSTATE 4-byte values (256 bits) The state is the checksum. Every bit of the key affects every bit of the state. There are no funnels. About 112+6.875len instructions. If you are hashing n strings (ub1 **)k, do it like this: for (i=0; i<8; ++i) state[i] = 0x9e3779b9; for (i=0, h=0; i<n; ++i) checksum( k[i], len[i], state); (c) Bob Jenkins, 1996. bob...@bu.... You may use this code any way you wish, private, educational, or commercial, as long as this whole comment accompanies it. See http://burtleburtle.net/bob/hash/evahash.html Use to detect changes between revisions of documents, assuming nobody is trying to cause collisions. Do NOT use for cryptography. -------------------------------------------------------------------- */ void checksum( register ub1 *k, register ub4 len, register ub4 *state ) { register ub4 a,b,c,d,e,f,g,h,length; /* Use the length and level; add in the golden ratio. */ length = len; a=state[0]; b=state[1]; c=state[2]; d=state[3]; e=state[4]; f=state[5]; g=state[6]; h=state[7]; /*---------------------------------------- handle most of the key */ while (len >= 32) { a += (k[0] +(k[1]<<8) +(k[2]<<16) +(k[3]<<24)); b += (k[4] +(k[5]<<8) +(k[6]<<16) +(k[7]<<24)); c += (k[8] +(k[9]<<8) +(k[10]<<16)+(k[11]<<24)); d += (k[12]+(k[13]<<8)+(k[14]<<16)+(k[15]<<24)); e += (k[16]+(k[17]<<8)+(k[18]<<16)+(k[19]<<24)); f += (k[20]+(k[21]<<8)+(k[22]<<16)+(k[23]<<24)); g += (k[24]+(k[25]<<8)+(k[26]<<16)+(k[27]<<24)); h += (k[28]+(k[29]<<8)+(k[30]<<16)+(k[31]<<24)); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); k += 32; len -= 32; } /*------------------------------------- handle the last 31 bytes */ h += length; switch(len) { case 31: h+=(k[30]<<24); case 30: h+=(k[29]<<16); case 29: h+=(k[28]<<8); case 28: g+=(k[27]<<24); case 27: g+=(k[26]<<16); case 26: g+=(k[25]<<8); case 25: g+=k[24]; case 24: f+=(k[23]<<24); case 23: f+=(k[22]<<16); case 22: f+=(k[21]<<8); case 21: f+=k[20]; case 20: e+=(k[19]<<24); case 19: e+=(k[18]<<16); case 18: e+=(k[17]<<8); case 17: e+=k[16]; case 16: d+=(k[15]<<24); case 15: d+=(k[14]<<16); case 14: d+=(k[13]<<8); case 13: d+=k[12]; case 12: c+=(k[11]<<24); case 11: c+=(k[10]<<16); case 10: c+=(k[9]<<8); case 9 : c+=k[8]; case 8 : b+=(k[7]<<24); case 7 : b+=(k[6]<<16); case 6 : b+=(k[5]<<8); case 5 : b+=k[4]; case 4 : a+=(k[3]<<24); case 3 : a+=(k[2]<<16); case 2 : a+=(k[1]<<8); case 1 : a+=k[0]; } mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); /*-------------------------------------------- report the result */ state[0]=a; state[1]=b; state[2]=c; state[3]=d; state[4]=e; state[5]=f; state[6]=g; state[7]=h; } --- NEW FILE: lookupa.h --- /* ------------------------------------------------------------------------------ By Bob Jenkins, September 1996. lookupa.h, a hash function for table lookup, same function as lookup.c. Use this code in any way you wish. Public Domain. It has no warranty. Source is http://burtleburtle.net/bob/c/lookupa.h ------------------------------------------------------------------------------ */ #ifndef LOOKUPA #define LOOKUPA typedef unsigned long int ub4; typedef unsigned char ub1; #define CHECKSTATE 8 #define hashsize(n) ((ub4)1<<(n)) #define hashmask(n) (hashsize(n)-1) ub4 lookup(ub1 *k, ub4 length, ub4 level); void checksum(ub1 *k, ub4 length, ub4 *state); #endif /* LOOKUPA */ Index: Doxyfile =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/Doxyfile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Doxyfile 25 Mar 2004 10:20:37 -0000 1.2 --- Doxyfile 30 Mar 2004 10:35:46 -0000 1.3 *************** *** 24,28 **** # if some version control system is used. ! PROJECT_NUMBER = 0.92 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) --- 24,28 ---- # if some version control system is used. ! PROJECT_NUMBER = 0.93 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) Index: Makefile =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile 4 Mar 2004 08:50:15 -0000 1.1.1.1 --- Makefile 30 Mar 2004 10:35:46 -0000 1.2 *************** *** 4,8 **** build: ! $(APXS) -Wc,-Wall,-O3,-fomit-frame-pointer,-pipe -c mod_xhtml_neg.c -o mod_xhtml_neg.so install: --- 4,8 ---- build: ! $(APXS) -Wc,-Wall,-O3,-fomit-frame-pointer,-pipe -c mod_xhtml_neg.c lookupa.c -o mod_xhtml_neg.so install: Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/mod_xhtml_neg.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** mod_xhtml_neg.c 28 Mar 2004 05:57:05 -0000 1.29 --- mod_xhtml_neg.c 30 Mar 2004 10:35:46 -0000 1.30 *************** *** 77,81 **** * @author Nicholas Cull <ru...@us...> * @date 1 March 2004 ! * @version 0.92 * * @history --- 77,81 ---- * @author Nicholas Cull <ru...@us...> * @date 1 March 2004 ! * @version 0.93 * * @history *************** *** 86,89 **** --- 86,90 ---- * 0.9 ETag handled correctly for different content types. \n * 0.92 Pick up the AddDefaultCharset directive from the Apache core \n + * 0.93 Use a better hash function for ETag uniqueness \n * * @directive *************** *** 118,121 **** --- 119,123 ---- #include "http_protocol.h" #include "http_log.h" + #include "lookupa.h" /** Read/write flags used when opening the log file. */ *************** *** 610,620 **** * Make a simple hash code for the given accept_rec structure. This allows * us to generate unique Etags for accepted content-types. The Etag ! * consists of two simple values, the length of the interesting data, ! * and a simple hash of each character. These are then represented as ! * two hyphen separated, zero padded hexadecimal numbers. * * The data that we use to generate the hash is the content-type and charset, * concatenated as one long string. * * @param p a memory pool from which we can allocate temporary memory for this * request --- 612,624 ---- * Make a simple hash code for the given accept_rec structure. This allows * us to generate unique Etags for accepted content-types. The Etag ! * consists of a hash of each character. This is then represented as a ! * zero padded hexadecimal number. * * The data that we use to generate the hash is the content-type and charset, * concatenated as one long string. * + * The hash function is a hash in the public domain by By Bob Jenkins. See + * lookupa.c or http://burtleburtle.net/bob/hash/doobs.html for details. + * * @param p a memory pool from which we can allocate temporary memory for this * request *************** *** 631,647 **** int len, i; ! data = ap_pstrcat( p, rec->name, rec->charset, NULL ); len = mod_xhtml_strlen( data ); ! hash = 7; ! ! /* Note that we use a multiplier of 128 rather than 256 since HTTP ! * headers are only guaranteed 7-bit US-ASCII safe. ! */ ! for( i = 0; i < len; i++ ) { ! hash = hash * 128 + data[ i ]; ! } ! rec->hashcode = ap_psprintf(p, "\"%02x-%08lx\"", ! len, (unsigned long) hash); } --- 635,643 ---- int len, i; ! data = ap_pstrcat( p, rec->name, ";", rec->charset, NULL ); len = mod_xhtml_strlen( data ); ! hash = lookup( data, len, 0 ); ! rec->hashcode = ap_psprintf(p, "\"%08lx\"", (unsigned long) hash); } |
From: <ru...@us...> - 2004-03-28 06:08:27
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32203 Modified Files: mod_xhtml_neg.c Log Message: Resync with 2.0 codebase to avoid code drift. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/mod_xhtml_neg.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** mod_xhtml_neg.c 26 Mar 2004 10:57:46 -0000 1.28 --- mod_xhtml_neg.c 28 Mar 2004 05:57:05 -0000 1.29 *************** *** 92,97 **** * @c XhtmlNegTypes A file extension followed by one or more matching * content-type strings \n ! * @c XhtmlNegStarsIgnore The number of stars in an Accept token which ! * should be ignored if we match them \n * @c XhtmlNegCache Should negotiated HTTP 1.0 requests be cacheable? * Defaults to no \n --- 92,97 ---- * @c XhtmlNegTypes A file extension followed by one or more matching * content-type strings \n ! * @c XhtmlNegStarsIgnore The number of stars in an Accept token which should ! * be ignored if we match them \n * @c XhtmlNegCache Should negotiated HTTP 1.0 requests be cacheable? * Defaults to no \n *************** *** 134,137 **** --- 134,138 ---- /** The default HTTP character set for most content types. */ #define DEFAULT_CHARSET_NAME "iso-8859-1" + /** The default HTTP character set for text/xml and text/xml-external-entity * content types. */ *************** *** 173,180 **** */ typedef struct { ! char *fname; /**< Name of the log file we write to, if any */ ! int log_fd; /**< File descriptor of the log file, or -1 */ ! http_caching cache; /**< Flag to cache negotiated content in ! * HTTP 1.0 requests */ } xhtml_neg_state; --- 174,181 ---- */ typedef struct { ! char *fname; /**< Name of the log file we write to, if any */ ! int log_fd; /**< File descriptor of the log file, or -1 */ ! http_caching cache; /**< Flag to cache negotiated content in ! * HTTP 1.0 requests */ } xhtml_neg_state; *************** *** 210,215 **** */ typedef struct { ! char *extension; /**< Filename extension */ ! array_header *content_types; /**< Array of content accept tokens */ } extension_rec; --- 211,216 ---- */ typedef struct { ! char *extension; /**< Filename extension */ ! array_header *content_types; /**< Array of content accept tokens */ } extension_rec; *************** *** 696,739 **** static char *merge_validators(pool *p, char *old_variant, char *new_variant) { - char *etag; int old_weak, new_weak; if (mod_xhtml_strempty(old_variant)) { ! etag = new_variant; } else if (mod_xhtml_strempty(new_variant)) { ! etag = old_variant; ! } else { ! /* Merge any two vlist entries: one from any previous module, and ! * one from the current module. This merging makes revalidation ! * somewhat safer, ensures that caches which can deal with ! * Vary will (eventually) be updated if the set of variants is ! * changed, and is also a protocol requirement for transparent ! * content negotiation. ! */ ! /* if the variant list validator is weak, we make the whole ! * structured etag weak. If we would not, then clients could ! * have problems merging range responses if we have different ! * variants with the same non-globally-unique strong etag. ! */ ! old_weak = (old_variant[0] == 'W'); ! new_weak = (new_variant[0] == 'W'); ! /* merge old and new variant_etags into a structured etag */ ! old_variant[strlen(old_variant) - 1] = '\0'; ! if (new_weak) ! new_variant += 3; ! else ! new_variant++; ! if((old_weak == 0) && (new_weak != 0)) { ! etag = ap_pstrcat(p, "W/", old_variant, ";", new_variant, NULL); ! } else { ! etag = ap_pstrcat(p, old_variant, ";", new_variant, NULL); ! } } ! return etag; } --- 697,736 ---- static char *merge_validators(pool *p, char *old_variant, char *new_variant) { int old_weak, new_weak; if (mod_xhtml_strempty(old_variant)) { ! return new_variant; } else if (mod_xhtml_strempty(new_variant)) { ! return old_variant; ! } ! /* Merge any two vlist entries: one from any previous module, and ! * one from the current module. This merging makes revalidation ! * somewhat safer, ensures that caches which can deal with ! * Vary will (eventually) be updated if the set of variants is ! * changed, and is also a protocol requirement for transparent ! * content negotiation. ! */ ! /* if the variant list validator is weak, we make the whole ! * structured etag weak. If we would not, then clients could ! * have problems merging range responses if we have different ! * variants with the same non-globally-unique strong etag. ! */ ! old_weak = (old_variant[0] == 'W'); ! new_weak = (new_variant[0] == 'W'); ! /* merge old and new variant_etags into a structured etag */ ! old_variant[mod_xhtml_strlen(old_variant) - 1] = '\0'; ! if ((new_weak) && (mod_xhtml_strlen(new_variant) > 3)) ! new_variant += 3; ! else ! new_variant++; ! if((old_weak == 0) && (new_weak != 0)) { ! return ap_pstrcat(p, "W/", old_variant, ";", new_variant, NULL); } ! return ap_pstrcat(p, old_variant, ";", new_variant, NULL); } *************** *** 1391,1401 **** if( result_rec != NULL ) { ! /* Construct a "suffix" for the ETag, and make sure it gets * appended to the ETag that would normally be returned * by Apache. */ r->vlist_validator = merge_validators( r->pool, r->vlist_validator, result_rec->hashcode ); - r->content_type = reconstruct_content_type( r->pool, result_rec ); if( xns->log_fd > 0 ) { --- 1388,1398 ---- if( result_rec != NULL ) { ! /* Construct a new ETag suffix, and make sure it gets * appended to the ETag that would normally be returned * by Apache. */ + r->content_type = reconstruct_content_type( r->pool, result_rec ); r->vlist_validator = merge_validators( r->pool, r->vlist_validator, result_rec->hashcode ); if( xns->log_fd > 0 ) { |
From: <ru...@us...> - 2004-03-28 06:07:55
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32106 Modified Files: mod_xhtml_neg.c Log Message: Resync with 1.x codebase to avoid code drift. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0/mod_xhtml_neg.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** mod_xhtml_neg.c 26 Mar 2004 10:57:25 -0000 1.13 --- mod_xhtml_neg.c 28 Mar 2004 05:56:40 -0000 1.14 *************** *** 90,95 **** * @c XhtmlNegActive Is this module enabled? Defaults to no. \n * @c XhtmlNegLog A file name for an output log file \n ! * @c XhtmlNegTypes A file extension followed by one or more matching ! * content-type strings \n * @c XhtmlNegStarsIgnore The number of stars in an Accept token which should * be ignored if we match them \n --- 90,95 ---- * @c XhtmlNegActive Is this module enabled? Defaults to no. \n * @c XhtmlNegLog A file name for an output log file \n ! * @c XhtmlNegTypes A file extension followed by one or more matching ! * content-type strings \n * @c XhtmlNegStarsIgnore The number of stars in an Accept token which should * be ignored if we match them \n *************** *** 193,197 **** apr_array_header_t *extensions; /**< An array of extension_rec records */ int stars_ignore; /**< How many content-type stars before ! we ignore */ } xhtml_dir_config; --- 193,197 ---- apr_array_header_t *extensions; /**< An array of extension_rec records */ int stars_ignore; /**< How many content-type stars before ! * we ignore */ } xhtml_dir_config; *************** *** 703,707 **** { int old_weak, new_weak; - char *old_variable; if (mod_xhtml_strempty(old_variant)) { --- 703,706 ---- *************** *** 728,735 **** /* merge old and new variant_etags into a structured etag */ ! ! old_variable = apr_pstrdup( p, old_variant ); ! old_variable[strlen(old_variable) - 1] = '\0'; ! if ((new_weak) && (mod_xhtml_strlen(old_variable) > 3)) new_variant += 3; else --- 727,732 ---- /* merge old and new variant_etags into a structured etag */ ! old_variant[mod_xhtml_strlen(old_variant) - 1] = '\0'; ! if ((new_weak) && (mod_xhtml_strlen(new_variant) > 3)) new_variant += 3; else *************** *** 737,744 **** if((old_weak == 0) && (new_weak != 0)) { ! return apr_pstrcat(p, "W/", old_variable, ";", new_variant, NULL); } ! return apr_pstrcat(p, old_variable, ";", new_variant, NULL); } --- 734,741 ---- if((old_weak == 0) && (new_weak != 0)) { ! return apr_pstrcat(p, "W/", old_variant, ";", new_variant, NULL); } ! return apr_pstrcat(p, old_variant, ";", new_variant, NULL); } *************** *** 775,779 **** /** * Get a single mime type entry --- one media type and parameters; ! * enter the values we recognize into the argument accept_rec * * @param p a memory pool from which we can allocate temporary memory for this --- 772,776 ---- /** * Get a single mime type entry --- one media type and parameters; ! * enter the values we recognize into the argument accept_rec. * * @param p a memory pool from which we can allocate temporary memory for this *************** *** 870,874 **** /** ! * Deal with Accept header lines. * * The Accept request header is handled by do_accept_line() - it has the --- 867,871 ---- /** ! * Parse and tokenise Accept header lines. * * The Accept request header is handled by do_accept_line() - it has the *************** *** 910,914 **** /** ! * Deal explicitly with Accept-Charset headers. There is an extra record * inserted when neither "*" nor "ISO-8859-1" are mentioned. * --- 907,911 ---- /** ! * Parse and tokenise Accept-Charset headers. There is an extra record * inserted when neither "*" nor "ISO-8859-1" are mentioned. * *************** *** 1285,1291 **** /** ! * The main routine for the content-negotiation phase of this module ! * goes here. This is mainly setup, control flow and logging going on ! * here. * * Note that due to the way we hook into the Apache handler system means --- 1282,1287 ---- /** ! * The main routine for the content-negotiation phase of this module goes ! * here. This is mainly setup, control flow and logging going on here. * * Note that due to the way we hook into the Apache handler system means *************** *** 1323,1326 **** --- 1319,1331 ---- }; + /* Return OK if either active isn't ON, or stars_ignore is 0. */ + if( conf->active != active_on ) { + return DECLINED; + } + + if( conf->stars_ignore == 0 ) { + return DECLINED; + } + /* Only service requests for GET or HEAD methods. */ if( r->method_number != M_GET ) { *************** *** 1400,1404 **** r->content_type = reconstruct_content_type( r->pool, result_rec ); r->vlist_validator = merge_validators( r->pool, r->vlist_validator, ! result_rec->hashcode ); if( xns->log_fd != NULL ) { --- 1405,1409 ---- r->content_type = reconstruct_content_type( r->pool, result_rec ); r->vlist_validator = merge_validators( r->pool, r->vlist_validator, ! result_rec->hashcode ); if( xns->log_fd != NULL ) { *************** *** 1504,1508 **** char *content_type = apr_pstrdup( cmd->pool, type ); ! /* Probably don't want this bit... */ /* if (*ext == '.') --- 1509,1513 ---- char *content_type = apr_pstrdup( cmd->pool, type ); ! /* Probably don't need this bit... */ /* if (*ext == '.') *************** *** 1528,1532 **** /** ! * Note the minimun number of stars in an Accept token that should be * ignored when performing negotiation. * --- 1533,1537 ---- /** ! * Set the minimun number of stars in an Accept token that should be * ignored when performing negotiation. * |
From: <ru...@us...> - 2004-03-26 11:08:43
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28956 Modified Files: mod_xhtml_neg.c Log Message: More minor fixes to Doxygen info. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/mod_xhtml_neg.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** mod_xhtml_neg.c 26 Mar 2004 10:31:25 -0000 1.27 --- mod_xhtml_neg.c 26 Mar 2004 10:57:46 -0000 1.28 *************** *** 1255,1259 **** * new tokens: "Accept" and "Accept-Charset". * ! * @param r the current HTTP request */ --- 1255,1259 ---- * new tokens: "Accept" and "Accept-Charset". * ! * @param r the current HTTP request to which we merge Vary tokens */ *************** *** 1436,1450 **** * * @param dir_config the configuration information for this directory ! * @param arg a yes/no flag indicating whether the module should be active * @return NULL to indicate that processing was successful */ static const char *set_xhtml_active(cmd_parms *cmd, ! xhtml_dir_config *dir_config, int arg) { /* If we're here at all it's because someone explicitly * set the active flag */ ! if ( arg ) { dir_config->active = active_on; } else { --- 1436,1450 ---- * * @param dir_config the configuration information for this directory ! * @param active a yes/no flag indicating whether the module should be active * @return NULL to indicate that processing was successful */ static const char *set_xhtml_active(cmd_parms *cmd, ! xhtml_dir_config *dir_config, int active) { /* If we're here at all it's because someone explicitly * set the active flag */ ! if ( active ) { dir_config->active = active_on; } else { *************** *** 1485,1489 **** * @param dir_config the configuration information for this directory * @param ext the file extension we're configuring ! * @param contenttype the content type to be added for this file extension * @return NULL to indicate that processing was successful */ --- 1485,1489 ---- * @param dir_config the configuration information for this directory * @param ext the file extension we're configuring ! * @param type the content type to be added for this file extension * @return NULL to indicate that processing was successful */ *************** *** 1491,1495 **** static const char *add_xhtml_type(cmd_parms *cmd, xhtml_dir_config *dir_config, ! char *ext, char *contenttype) { extension_rec *rec; --- 1491,1495 ---- static const char *add_xhtml_type(cmd_parms *cmd, xhtml_dir_config *dir_config, ! char *ext, char *type) { extension_rec *rec; *************** *** 1502,1506 **** */ ! ap_str_tolower(contenttype); rec = find_extension( dir_config->extensions, ext ); --- 1502,1506 ---- */ ! ap_str_tolower(type); rec = find_extension( dir_config->extensions, ext ); *************** *** 1513,1517 **** new = (accept_rec *) ap_push_array( rec->content_types ); ! get_entry( cmd->pool, new, contenttype ); make_etag_hashcode( cmd->pool, new ); --- 1513,1517 ---- new = (accept_rec *) ap_push_array( rec->content_types ); ! get_entry( cmd->pool, new, type ); make_etag_hashcode( cmd->pool, new ); |
From: <ru...@us...> - 2004-03-26 11:08:23
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28895 Modified Files: mod_xhtml_neg.c Log Message: More minor fixes to Doxygen info. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0/mod_xhtml_neg.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mod_xhtml_neg.c 26 Mar 2004 10:52:55 -0000 1.12 --- mod_xhtml_neg.c 26 Mar 2004 10:57:25 -0000 1.13 *************** *** 176,180 **** * caching state for HTTP 1.0 requests. */ - typedef struct { char *fname; /**< Name of the log file we write to, if any */ --- 176,179 ---- *************** *** 190,194 **** * we should ignore. */ - typedef struct { xhtml_neg_active active; /**< Is the module active for this directory? */ --- 189,192 ---- *************** *** 200,206 **** /** * Record of available info on a media type specified by the client. ! * We also use them for encodings and profiles. */ - typedef struct { char *name; /**< The name, normalised to lowercase */ --- 198,203 ---- /** * Record of available info on a media type specified by the client. ! * We also use it for encoding and profile information. */ typedef struct { char *name; /**< The name, normalised to lowercase */ *************** *** 216,220 **** * types themselves are stored as an array of accept_rec records. */ - typedef struct { char *extension; /**< Filename extension */ --- 213,216 ---- |
From: <ru...@us...> - 2004-03-26 11:03:52
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28182 Modified Files: mod_xhtml_neg.c Log Message: More documentation on parameters and return values for each function. Some other minor tidy-ups. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0/mod_xhtml_neg.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mod_xhtml_neg.c 25 Mar 2004 10:20:54 -0000 1.11 --- mod_xhtml_neg.c 26 Mar 2004 10:52:55 -0000 1.12 *************** *** 116,120 **** #include "http_request.h" ! /* This is naughty */ #define CORE_PRIVATE --- 116,124 ---- #include "http_request.h" ! /* This is naughty, because it gives us access to private areas of ! * http_core.c. We use this to retrieve default charset information ! * from the core module. This is populated by the AddDefaultCharset ! * directive. ! */ #define CORE_PRIVATE *************** *** 200,206 **** typedef struct { ! char *name; /**< MUST be lowercase */ float q_value; /**< Quality value, from 0 to 1. */ ! char *charset; /**< for content-type only */ char *profile; /**< The XHTML profile, as per RFC 3236 */ int stars; /**< How many stars in this accept token? */ --- 204,210 ---- typedef struct { ! char *name; /**< The name, normalised to lowercase */ float q_value; /**< Quality value, from 0 to 1. */ ! char *charset; /**< Charset parameter, for content-type only */ char *profile; /**< The XHTML profile, as per RFC 3236 */ int stars; /**< How many stars in this accept token? */ *************** *** 227,230 **** --- 231,237 ---- * string just to return a length, as per strlen. * + * @param str a string pointer, possibly NULL, to be tested + * @return non-zero if the pointer is NULL, or points to a zero-length + * string, otherwise zero * @todo could macro-ise this function. */ *************** *** 235,240 **** /** ! * Re-implement strlen, since relying on it being included somewhere along ! * the way appears to be unsafe. */ --- 242,250 ---- /** ! * Calculate the length of the given string. The pointer may be NULL. ! * ! * @param str a string pointer, possibly NULL, to be tested ! * @return the length of the string if the pointer is non-NULL, otherwise ! * zero */ *************** *** 255,258 **** --- 265,275 ---- /** * Compare one string against another in a case-sensitive manner. + * Will correctly deal with either pointer being NULL. + * + * @param str1 the first string pointer to be compared + * @param str2 the second string pointer to be compared + * @return zero if the strings are identical, less than zero if the + * first string is less than the second, or greater than zero if the + * first string is greater than the second */ *************** *** 289,292 **** --- 306,316 ---- /** * Compare one string against another in a case-insensitive manner. + * Will correctly deal with either pointer being NULL. + * + * @param str1 the first string pointer to be compared + * @param str2 the second string pointer to be compared + * @return zero if the strings are identical, less than zero if the + * first string is less than the second, or greater than zero if the + * first string is greater than the second */ *************** *** 333,336 **** --- 357,368 ---- * Compare strings up to a specified limit in a case-sensitive manner. * If a NULL byte is encountered, finish comparing at that character. + * Will correctly deal with either pointer being NULL. + * + * @param str1 the first string pointer to be compared + * @param str2 the second string pointer to be compared + * @param len the maximum number of characters to be compared + * @return zero if the substrings are identical, less than zero if the + * first substring is less than the second, or greater than zero if the + * first substring is greater than the second */ *************** *** 370,373 **** --- 402,413 ---- * Compare strings up to a specified limit in a case-insensitive manner. * If a NULL byte is encountered, finish comparing at that character. + * Will correctly deal with either pointer being NULL. + * + * @param str1 the first string pointer to be compared + * @param str2 the second string pointer to be compared + * @param len the maximum number of characters to be compared + * @return zero if the substrings are identical, less than zero if the + * first substring is less than the second, or greater than zero if the + * first substring is greater than the second */ *************** *** 417,420 **** --- 457,466 ---- * Determines if the given string end with the given suffix. Case matching * can be enabled or disabled. + * + * @param reference the reference string to be tested, possibly NULL + * @param suffix the suffix to test against, possibly NULL + * @param casecompare non-zero if a case sensitive compare is wanted, + * otherwise zero for a case insensitive compare + * @return non-zero if the suffix matches, otherwise zero */ *************** *** 456,459 **** --- 502,509 ---- * to find the default character set. * + * @param r the current HTTP request from which we can determine the + * configuration of the Apache core + * @return the default character set as configured in the Apache core, + * or NULL if no value is configured * @todo Is there a cleaner way to find the default charset information? */ *************** *** 477,480 **** --- 527,534 ---- * extension. If a match is found, return the extension_rec, otherwise * return NULL. + * + * @param extensions an array of extension_rec elements to be scanned + * @param ext the file extension to match + * @return the matching extension_rec item if one was found, otherwise NULL */ *************** *** 506,509 **** --- 560,567 ---- * Count the number of stars in an Accept content token. This helps determine * priority in case of a tie in q-value priorities. + * + * @param content_type the content token that we're interested in, possibly + * NULL + * @return the number of '*' characters in the string */ *************** *** 532,535 **** --- 590,597 ---- * content-type string. * + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @param content_rec the accept_rec that matched the content negotiation + * @param a string that contains a correctly formatted content-type value * @todo should we send the "profile" parameter as well? */ *************** *** 562,565 **** --- 624,631 ---- * concatenated as one long string. * + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @param rec the accept_rec that matched the content negotiation; the hash + * value will be added to this structure * @todo If the content-type returned ever includes the "profile" parameter, * include it as part of the hash code. *************** *** 592,595 **** --- 658,670 ---- * parameter default_charset is used. Note that default_charset can be * NULL, in which case charset will be set to the empty string. + * + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @param rec the accept_rec that matched the content negotiation + * @param default_charset the default character set as configured in the + * Apache core + * @return the original accept_rec if it already contains a charset parameter, + * otherwise a new accept_rec containing the same information and the default + * charset parameter */ *************** *** 618,621 **** --- 693,704 ---- * Merge vlist_validators from different modules. This code is adapted * from code in http_protocol.c in the Apache 1.3 core. + * + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @param old_variant an Etag variant taken from the vlist_validator parameter + * of the current request + * @param new_variant an Etag variant as supplied by make_etag_hashcode + * @return a correctly merged Etag variant, taking into account whether either + * variant has a weak validator attached, or whether either variant is NULL */ *************** *** 669,672 **** --- 752,760 ---- * until we find a match. The first match wins. If no match is found, * NULL is returned. + * + * @param extensions an array of extension_rec elements containing filename + * suffixes to be matched + * @param filename the filename we want to match + * @return the matching extension_rec item if one exists, otherwise NULL */ *************** *** 692,695 **** --- 780,789 ---- * Get a single mime type entry --- one media type and parameters; * enter the values we recognize into the argument accept_rec + * + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @param result the accept_rec to be populated by parsing the accept_line + * @param accept_line a string containing the accept token to be parsed + * @return any remaining accept_line string left to be parsed */ *************** *** 793,796 **** --- 887,895 ---- * These probably won't appear at an origin server, but we handle * them explicitly if they do. + * + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @param accept_line the HTTP Accept request value to be parsed + * @return an array of accept_rec items containing the parsed Accept tokens */ *************** *** 817,820 **** --- 916,926 ---- * Deal explicitly with Accept-Charset headers. There is an extra record * inserted when neither "*" nor "ISO-8859-1" are mentioned. + * + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @param accept_charset_line the HTTP Accept-Charset request value to be + * parsed + * @return an array of accept_rec items containing the parsed Accept-Charset + * tokens */ *************** *** 870,873 **** --- 976,984 ---- * Look for a matching charset within the given array of accept_recs. If we * find a match, return the corresponding q value, otherwise return 0.0. + * + * @param accept_charsets an array of accept_rec items containing + * Accept-Charset tokens to be matched + * @param content_charset the target charset parameter to match + * @return the q value of the best match, or 0.0f if no match was found */ *************** *** 914,917 **** --- 1025,1037 ---- * the q value of the Accept-Charset header. Where no q-value is specified, * the value "1.0" is used. + * + * @param content_type the content-type token to match + * @param content_accept the accept token to be matched + * @param accept_charsets an array of accept_rec items containing + * Accept-Charset tokens to be matched + * @param default_charset the default charset value as configured in the + * Apache core + * @return the q value of the best matching content-type and charset + * combination, or 0.0f if no match was found */ *************** *** 1031,1034 **** --- 1151,1170 ---- * content-type headers and an optional default content-type in the event of * a star-slash-star match. + * + * @param accept_type an array of accept_rec items containing Accept tokens + * @param content_type an array of accept_rec items containing possible + * content-type tokens to be matched + * @param accept_charset an array of accept_rec items containing + * Accept-Charset tokens + * @param default_charset the default character set as configured in the + * Apache core + * @param stars_to_match the number of '*' tokens at which we start ignoring + * the Accept token + * @param xns the configuration state of the module in case we need to write + * to the log file + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @return an accept_rec structure containing the best match we could find for + * the current request, or NULL if we couldn't find a match */ *************** *** 1130,1133 **** --- 1266,1271 ---- * If "Vary: *" exists, return it unaltered. Otherwise, we need to merge two * new tokens: "Accept" and "Accept-Charset". + * + * @param r the current HTTP request to which we merge Vary tokens */ *************** *** 1159,1162 **** --- 1297,1304 ---- * We do this so that the default handler will always run, and so that * ETag is handled correctly for both 200 OK and 304 Not Modified cases. + * + * @param r the current HTTP request + * @return DECLINED, to indicate the request should be processed by the + * next handler in the chain */ *************** *** 1301,1308 **** /** * Is this module active for the given directory. */ static const char *set_xhtml_active(cmd_parms *cmd, ! void *in_dir_config, int arg) { xhtml_dir_config *dir_config = in_dir_config; --- 1443,1454 ---- /** * Is this module active for the given directory. + * + * @param in_dir_config the configuration information for this directory + * @param active a yes/no flag indicating whether the module should be active + * @return NULL to indicate that processing was successful */ static const char *set_xhtml_active(cmd_parms *cmd, ! void *in_dir_config, int active) { xhtml_dir_config *dir_config = in_dir_config; *************** *** 1311,1315 **** * set the active flag */ ! if ( arg ) { dir_config->active = active_on; } else { --- 1457,1461 ---- * set the active flag */ ! if ( active ) { dir_config->active = active_on; } else { *************** *** 1322,1329 **** * Set whether HTTP 1.0 caching should be allowed. Default to "no" unless * specifically overridden. */ static const char *set_xhtml_cache_negotiated(cmd_parms *cmd, void *dummy, ! int arg) { xhtml_neg_state *xns; --- 1468,1480 ---- * Set whether HTTP 1.0 caching should be allowed. Default to "no" unless * specifically overridden. + * + * @param cmd the configuration information for this module on a per-server + * basis + * @param cache a flag indicating whether HTTP 1.0 caching should be enabled + * @return NULL to indicate that processing was successful */ static const char *set_xhtml_cache_negotiated(cmd_parms *cmd, void *dummy, ! int cache) { xhtml_neg_state *xns; *************** *** 1332,1344 **** &xhtml_neg_module); ! if( arg ) { xns->cache = caching_on; } else { xns->cache = caching_off; } } /** * Add content types for the given file extension. */ --- 1483,1501 ---- &xhtml_neg_module); ! if( cache ) { xns->cache = caching_on; } else { xns->cache = caching_off; } + return NULL; } /** * Add content types for the given file extension. + * + * @param in_dir_config the configuration information for this directory + * @param ext the file extension we're configuring + * @param type the content type to be added for this file extension + * @return NULL to indicate that processing was successful */ *************** *** 1377,1380 **** --- 1534,1542 ---- * Note the minimun number of stars in an Accept token that should be * ignored when performing negotiation. + * + * @param in_dir_config the configuration information for this directory + * @param stars the number of '*' tokens at which we start ignoring any + * Accept tokens + * @return NULL to indicate that processing was successful */ *************** *** 1400,1403 **** --- 1562,1570 ---- /** * Set the log file name for this module. + * + * @param cmd the configuration information for this module on a per-server + * basis + * @param logfile the name of the log file to which the module should write + * @return NULL to indicate that processing was successful */ *************** *** 1418,1421 **** --- 1585,1592 ---- /** * Create a default XHTML negotiation module configuration record. + * + * @param p a memory pool from which we can allocate memory that can later + * be recycled + * @return a new per-server configuration structure for this module */ *************** *** 1434,1437 **** --- 1605,1612 ---- /** * Create a default directory configuration module. + * + * @param p a memory pool from which we can allocate memory that can later + * be recycled + * @return a new per-directory configuration structure for this module */ *************** *** 1450,1453 **** --- 1625,1634 ---- /** * Merge configuration info from different directories. + * + * @param p a memory pool from which we can allocate memory that can later + * be recycled + * @param basev the base directory configuration to be merged + * @param addv the additional directory configuration to be merged + * @return a merged per-directory configuration structure for this module */ *************** *** 1493,1496 **** --- 1674,1682 ---- /** * Initialize the log file, if one is specified. + * + * @param s the server configuration from which we derive the state of this + * module + * @param p a memory pool from which we can allocate memory that can later + * be recycled */ |
From: <ru...@us...> - 2004-03-26 10:42:22
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24551 Modified Files: mod_xhtml_neg.c Log Message: More documentation on parameters and return values for each function. Some other minor tidy-ups. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/mod_xhtml_neg.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** mod_xhtml_neg.c 25 Mar 2004 10:20:37 -0000 1.26 --- mod_xhtml_neg.c 26 Mar 2004 10:31:25 -0000 1.27 *************** *** 108,112 **** #include "http_request.h" ! /* This is naughty */ #define CORE_PRIVATE --- 108,116 ---- #include "http_request.h" ! /* This is naughty, because it gives us access to private areas of ! * http_core.c. We use this to retrieve default charset information ! * from the core module. This is populated by the AddDefaultCharset ! * directive. ! */ #define CORE_PRIVATE *************** *** 168,172 **** * caching state for HTTP 1.0 requests. */ - typedef struct { char *fname; /**< Name of the log file we write to, if any */ --- 172,175 ---- *************** *** 182,186 **** * we should ignore. */ - typedef struct { xhtml_neg_active active; /**< Is the module active for this directory? */ --- 185,188 ---- *************** *** 192,202 **** /** * Record of available info on a media type specified by the client. ! * We also use them for encodings and profiles. */ - typedef struct { ! char *name; /**< MUST be lowercase */ float q_value; /**< Quality value, from 0 to 1. */ ! char *charset; /**< for content-type only */ char *profile; /**< The XHTML profile, as per RFC 3236 */ int stars; /**< How many stars in this accept token? */ --- 194,203 ---- /** * Record of available info on a media type specified by the client. ! * We also use it for encoding and profile information. */ typedef struct { ! char *name; /**< The name, normalised to lowercase */ float q_value; /**< Quality value, from 0 to 1. */ ! char *charset; /**< Charset parameter, for content-type only */ char *profile; /**< The XHTML profile, as per RFC 3236 */ int stars; /**< How many stars in this accept token? */ *************** *** 208,212 **** * types themselves are stored as an array of accept_rec records. */ - typedef struct { char *extension; /**< Filename extension */ --- 209,212 ---- *************** *** 214,219 **** } extension_rec; - /* String utility functions start here. */ - /* * Utility functions for strings, since we can't rely on these functions being --- 214,217 ---- *************** *** 225,228 **** --- 223,229 ---- * string just to return a length, as per strlen. * + * @param str a string pointer, possibly NULL, to be tested + * @return non-zero if the pointer is NULL, or points to a zero-length + * string, otherwise zero * @todo could macro-ise this function. */ *************** *** 233,238 **** /** ! * Re-implement strlen, since relying on it being included somewhere along ! * the way appears to be unsafe. */ --- 234,242 ---- /** ! * Calculate the length of the given string. The pointer may be NULL. ! * ! * @param str a string pointer, possibly NULL, to be tested ! * @return the length of the string if the pointer is non-NULL, otherwise ! * zero */ *************** *** 253,256 **** --- 257,267 ---- /** * Compare one string against another in a case-sensitive manner. + * Will correctly deal with either pointer being NULL. + * + * @param str1 the first string pointer to be compared + * @param str2 the second string pointer to be compared + * @return zero if the strings are identical, less than zero if the + * first string is less than the second, or greater than zero if the + * first string is greater than the second */ *************** *** 287,290 **** --- 298,308 ---- /** * Compare one string against another in a case-insensitive manner. + * Will correctly deal with either pointer being NULL. + * + * @param str1 the first string pointer to be compared + * @param str2 the second string pointer to be compared + * @return zero if the strings are identical, less than zero if the + * first string is less than the second, or greater than zero if the + * first string is greater than the second */ *************** *** 331,334 **** --- 349,360 ---- * Compare strings up to a specified limit in a case-sensitive manner. * If a NULL byte is encountered, finish comparing at that character. + * Will correctly deal with either pointer being NULL. + * + * @param str1 the first string pointer to be compared + * @param str2 the second string pointer to be compared + * @param len the maximum number of characters to be compared + * @return zero if the substrings are identical, less than zero if the + * first substring is less than the second, or greater than zero if the + * first substring is greater than the second */ *************** *** 368,371 **** --- 394,405 ---- * Compare strings up to a specified limit in a case-insensitive manner. * If a NULL byte is encountered, finish comparing at that character. + * Will correctly deal with either pointer being NULL. + * + * @param str1 the first string pointer to be compared + * @param str2 the second string pointer to be compared + * @param len the maximum number of characters to be compared + * @return zero if the substrings are identical, less than zero if the + * first substring is less than the second, or greater than zero if the + * first substring is greater than the second */ *************** *** 415,418 **** --- 449,458 ---- * Determines if the given string end with the given suffix. Case matching * can be enabled or disabled. + * + * @param reference the reference string to be tested, possibly NULL + * @param suffix the suffix to test against, possibly NULL + * @param casecompare non-zero if a case sensitive compare is wanted, + * otherwise zero for a case insensitive compare + * @return non-zero if the suffix matches, otherwise zero */ *************** *** 454,457 **** --- 494,501 ---- * to find the default character set. * + * @param r the current HTTP request from which we can determine the + * configuration of the Apache core + * @return the default character set as configured in the Apache core, + * or NULL if no value is configured * @todo Is there a cleaner way to find the default charset information? */ *************** *** 475,478 **** --- 519,526 ---- * extension. If a match is found, return the extension_rec, otherwise * return NULL. + * + * @param extensions an array of extension_rec elements to be scanned + * @param ext the file extension to match + * @return the matching extension_rec item if one was found, otherwise NULL */ *************** *** 504,507 **** --- 552,559 ---- * Count the number of stars in an Accept content token. This helps determine * priority in case of a tie in q-value priorities. + * + * @param content_type the content token that we're interested in, possibly + * NULL + * @return the number of '*' characters in the string */ *************** *** 530,533 **** --- 582,589 ---- * content-type string. * + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @param content_rec the accept_rec that matched the content negotiation + * @param a string that contains a correctly formatted content-type value * @todo should we send the "profile" parameter as well? */ *************** *** 560,563 **** --- 616,623 ---- * concatenated as one long string. * + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @param rec the accept_rec that matched the content negotiation; the hash + * value will be added to this structure * @todo If the content-type returned ever includes the "profile" parameter, * include it as part of the hash code. *************** *** 590,593 **** --- 650,662 ---- * parameter default_charset is used. Note that default_charset can be * NULL, in which case charset will be set to the empty string. + * + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @param rec the accept_rec that matched the content negotiation + * @param default_charset the default character set as configured in the + * Apache core + * @return the original accept_rec if it already contains a charset parameter, + * otherwise a new accept_rec containing the same information and the default + * charset parameter */ *************** *** 615,618 **** --- 684,695 ---- * Merge vlist_validators from different modules. This code is adapted * from code in http_protocol.c in the Apache 1.3 core. + * + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @param old_variant an Etag variant taken from the vlist_validator parameter + * of the current request + * @param new_variant an Etag variant as supplied by make_etag_hashcode + * @return a correctly merged Etag variant, taking into account whether either + * variant has a weak validator attached, or whether either variant is NULL */ *************** *** 666,669 **** --- 743,751 ---- * until we find a match. The first match wins. If no match is found, * NULL is returned. + * + * @param extensions an array of extension_rec elements containing filename + * suffixes to be matched + * @param filename the filename we want to match + * @return the matching extension_rec item if one exists, otherwise NULL */ *************** *** 689,692 **** --- 771,780 ---- * Get a single mime type entry --- one media type and parameters; * enter the values we recognize into the argument accept_rec. + * + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @param result the accept_rec to be populated by parsing the accept_line + * @param accept_line a string containing the accept token to be parsed + * @return any remaining accept_line string left to be parsed */ *************** *** 777,781 **** /** ! * Deal with Accept header lines. * * The Accept request header is handled by do_accept_line() - it has the --- 865,869 ---- /** ! * Parse and tokenise Accept header lines. * * The Accept request header is handled by do_accept_line() - it has the *************** *** 790,793 **** --- 878,886 ---- * These probably won't appear at an origin server, but we handle * them explicitly if they do. + * + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @param accept_line the HTTP Accept request value to be parsed + * @return an array of accept_rec items containing the parsed Accept tokens */ *************** *** 811,816 **** /** ! * Deal explicitly with Accept-Charset headers. There is an extra record * inserted when neither "*" nor "ISO-8859-1" are mentioned. */ --- 904,916 ---- /** ! * Parse and tokenise Accept-Charset headers. There is an extra record * inserted when neither "*" nor "ISO-8859-1" are mentioned. + * + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @param accept_charset_line the HTTP Accept-Charset request value to be + * parsed + * @return an array of accept_rec items containing the parsed Accept-Charset + * tokens */ *************** *** 866,869 **** --- 966,974 ---- * Look for a matching charset within the given array of accept_recs. If we * find a match, return the corresponding q value, otherwise return 0.0. + * + * @param accept_charsets an array of accept_rec items containing + * Accept-Charset tokens to be matched + * @param content_charset the target charset parameter to match + * @return the q value of the best match, or 0.0f if no match was found */ *************** *** 910,913 **** --- 1015,1027 ---- * the q value of the Accept-Charset header. Where no q-value is specified, * the value "1.0" is used. + * + * @param content_type the content-type token to match + * @param content_accept the accept token to be matched + * @param accept_charsets an array of accept_rec items containing + * Accept-Charset tokens to be matched + * @param default_charset the default charset value as configured in the + * Apache core + * @return the q value of the best matching content-type and charset + * combination, or 0.0f if no match was found */ *************** *** 1027,1030 **** --- 1141,1160 ---- * content-type headers and an optional default content-type in the event of * a star-slash-star match. + * + * @param accept_type an array of accept_rec items containing Accept tokens + * @param content_type an array of accept_rec items containing possible + * content-type tokens to be matched + * @param accept_charset an array of accept_rec items containing + * Accept-Charset tokens + * @param default_charset the default character set as configured in the + * Apache core + * @param stars_to_match the number of '*' tokens at which we start ignoring + * the Accept token + * @param xns the configuration state of the module in case we need to write + * to the log file + * @param p a memory pool from which we can allocate temporary memory for this + * request + * @return an accept_rec structure containing the best match we could find for + * the current request, or NULL if we couldn't find a match */ *************** *** 1124,1127 **** --- 1254,1259 ---- * If "Vary: *" exists, return it unaltered. Otherwise, we need to merge two * new tokens: "Accept" and "Accept-Charset". + * + * @param r the current HTTP request */ *************** *** 1145,1151 **** /** ! * The main routine for the content-negotiation phase of this module ! * goes here. This is mainly setup, control flow and logging going on ! * here. */ --- 1277,1285 ---- /** ! * The main routine for the content-negotiation phase of this module goes ! * here. This is mainly setup, control flow and logging going on here. ! * ! * @param r the current HTTP request ! * @return OK, to indicate the request was succesfully handled by this module */ *************** *** 1300,1303 **** --- 1434,1441 ---- /** * Is this module active for the given directory. + * + * @param dir_config the configuration information for this directory + * @param arg a yes/no flag indicating whether the module should be active + * @return NULL to indicate that processing was successful */ *************** *** 1319,1326 **** * Set whether HTTP 1.0 caching should be allowed. Default to "no" unless * specifically overridden. */ static const char *set_xhtml_cache_negotiated(cmd_parms *cmd, void *dummy, ! int arg) { xhtml_neg_state *xns; --- 1457,1469 ---- * Set whether HTTP 1.0 caching should be allowed. Default to "no" unless * specifically overridden. + * + * @param cmd the configuration information for this module on a per-server + * basis + * @param cache a flag indicating whether HTTP 1.0 caching should be enabled + * @return NULL to indicate that processing was successful */ static const char *set_xhtml_cache_negotiated(cmd_parms *cmd, void *dummy, ! int cache) { xhtml_neg_state *xns; *************** *** 1329,1344 **** &xhtml_neg_module); ! if( arg ) { xns->cache = caching_on; } else { xns->cache = caching_off; } } /** * Add content types for the given file extension. */ ! static const char *add_xhtml_type(cmd_parms *cmd, xhtml_dir_config *t, char *ext, char *contenttype) { --- 1472,1494 ---- &xhtml_neg_module); ! if( cache ) { xns->cache = caching_on; } else { xns->cache = caching_off; } + return NULL; } /** * Add content types for the given file extension. + * + * @param dir_config the configuration information for this directory + * @param ext the file extension we're configuring + * @param contenttype the content type to be added for this file extension + * @return NULL to indicate that processing was successful */ ! static const char *add_xhtml_type(cmd_parms *cmd, ! xhtml_dir_config *dir_config, char *ext, char *contenttype) { *************** *** 1346,1350 **** accept_rec *new; ! /* Probably don't want this bit... */ /* if (*ext == '.') --- 1496,1500 ---- accept_rec *new; ! /* Probably don't need this bit... */ /* if (*ext == '.') *************** *** 1354,1360 **** ap_str_tolower(contenttype); ! rec = find_extension( t->extensions, ext ); if( rec == NULL ) { ! rec = (extension_rec *) ap_push_array(t->extensions); rec->extension = ext; rec->content_types = ap_make_array( cmd->pool, 10, --- 1504,1510 ---- ap_str_tolower(contenttype); ! rec = find_extension( dir_config->extensions, ext ); if( rec == NULL ) { ! rec = (extension_rec *) ap_push_array(dir_config->extensions); rec->extension = ext; rec->content_types = ap_make_array( cmd->pool, 10, *************** *** 1370,1378 **** /** ! * Note the minimun number of stars in an Accept token that should be * ignored when performing negotiation. */ ! static const char *add_xhtml_ignore(cmd_parms *cmd, xhtml_dir_config *t, char *stars) { --- 1520,1534 ---- /** ! * Set the minimun number of stars in an Accept token that should be * ignored when performing negotiation. + * + * @param dir_config the configuration information for this directory + * @param stars the number of '*' tokens at which we start ignoring any + * Accept tokens + * @return NULL to indicate that processing was successful */ ! static const char *add_xhtml_ignore(cmd_parms *cmd, ! xhtml_dir_config *dir_config, char *stars) { *************** *** 1388,1392 **** } ! t->stars_ignore = ignore_stars; return NULL; } --- 1544,1548 ---- } ! dir_config->stars_ignore = ignore_stars; return NULL; } *************** *** 1394,1397 **** --- 1550,1558 ---- /** * Set the log file name for this module. + * + * @param cmd the configuration information for this module on a per-server + * basis + * @param logfile the name of the log file to which the module should write + * @return NULL to indicate that processing was successful */ *************** *** 1411,1414 **** --- 1572,1579 ---- /** * Create a default XHTML negotiation module configuration record. + * + * @param p a memory pool from which we can allocate memory that can later + * be recycled + * @return a new per-server configuration structure for this module */ *************** *** 1427,1430 **** --- 1592,1599 ---- /** * Create a default directory configuration module. + * + * @param p a memory pool from which we can allocate memory that can later + * be recycled + * @return a new per-directory configuration structure for this module */ *************** *** 1442,1445 **** --- 1611,1620 ---- /** * Merge configuration info from different directories. + * + * @param p a memory pool from which we can allocate memory that can later + * be recycled + * @param basev the base directory configuration to be merged + * @param addv the additional directory configuration to be merged + * @return a merged per-directory configuration structure for this module */ *************** *** 1485,1488 **** --- 1660,1668 ---- /** * Initialize the log file, if one is specified. + * + * @param s the server configuration from which we derive the state of this + * module + * @param p a memory pool from which we can allocate memory that can later + * be recycled */ |
From: <ru...@us...> - 2004-03-25 10:31:46
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28783 Modified Files: Doxyfile mod_xhtml_neg.c Log Message: More comment fixes. Index: Doxyfile =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0/Doxyfile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Doxyfile 24 Mar 2004 10:34:06 -0000 1.1 --- Doxyfile 25 Mar 2004 10:20:54 -0000 1.2 *************** *** 24,28 **** # if some version control system is used. ! PROJECT_NUMBER = 0.91 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) --- 24,28 ---- # if some version control system is used. ! PROJECT_NUMBER = 0.92 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) *************** *** 48,52 **** # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES ! EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class --- 48,52 ---- # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES ! EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0/mod_xhtml_neg.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mod_xhtml_neg.c 25 Mar 2004 10:04:31 -0000 1.10 --- mod_xhtml_neg.c 25 Mar 2004 10:20:54 -0000 1.11 *************** *** 92,96 **** * @c XhtmlNegTypes A file extension followed by one or more matching * content-type strings \n ! * @c XhtmlNegStarsIgnore The number of stars in an Accept header which should * be ignored if we match them \n * @c XhtmlNegCache Should negotiated HTTP 1.0 requests be cacheable? --- 92,96 ---- * @c XhtmlNegTypes A file extension followed by one or more matching * content-type strings \n ! * @c XhtmlNegStarsIgnore The number of stars in an Accept token which should * be ignored if we match them \n * @c XhtmlNegCache Should negotiated HTTP 1.0 requests be cacheable? *************** *** 183,187 **** * A per-directory configuration state for this module. Here we record the * file extension to content-type mappings, whether the module should be ! * active for this directory, and the types of wildcard Accept headers that * we should ignore. */ --- 183,187 ---- * A per-directory configuration state for this module. Here we record the * file extension to content-type mappings, whether the module should be ! * active for this directory, and the types of wildcard Accept tokens that * we should ignore. */ *************** *** 204,208 **** char *charset; /**< for content-type only */ char *profile; /**< The XHTML profile, as per RFC 3236 */ ! int stars; /**< How many stars in this accept name? */ char *hashcode; /**< The hashcode to be appended to Etags */ } accept_rec; --- 204,208 ---- char *charset; /**< for content-type only */ char *profile; /**< The XHTML profile, as per RFC 3236 */ ! int stars; /**< How many stars in this accept token? */ char *hashcode; /**< The hashcode to be appended to Etags */ } accept_rec; *************** *** 215,219 **** typedef struct { char *extension; /**< Filename extension */ ! apr_array_header_t *content_types; /**< Array of content accept headers */ } extension_rec; --- 215,219 ---- typedef struct { char *extension; /**< Filename extension */ ! apr_array_header_t *content_types; /**< Array of content accept tokens */ } extension_rec; *************** *** 504,508 **** /** ! * Count the number of stars in an Accept content header. This helps determine * priority in case of a tie in q-value priorities. */ --- 504,508 ---- /** ! * Count the number of stars in an Accept content token. This helps determine * priority in case of a tie in q-value priorities. */ *************** *** 834,838 **** iso8859_found = 0; ! /* Scan all the accept_recs items for a name of "ISO-8859-1" (case * insensitive). If there are no matching records, construct one with * a q value of "1", as per section 14.2 of the HTTP 1.1 spec (RFC 2616). --- 834,838 ---- iso8859_found = 0; ! /* Scan all the accept_recs tokens for a name of "ISO-8859-1" (case * insensitive). If there are no matching records, construct one with * a q value of "1", as per section 14.2 of the HTTP 1.1 spec (RFC 2616). *************** *** 897,901 **** /** ! * Determine a given content_type record matches the criteria of the given * content_accept record. Returns a quality value for the given variables. * --- 897,901 ---- /** ! * Determine if a given content_type record matches the criteria of the given * content_accept record. Returns a quality value for the given variables. * *************** *** 906,910 **** * * Once we match based on names, check whether a charset is present in the ! * content_acceptrecord. If so, need to match charsets exactly. Otherwise, * no further check is needed, and we can return true immediately. * --- 906,910 ---- * * Once we match based on names, check whether a charset is present in the ! * content_accept record. If so, need to match charsets exactly. Otherwise, * no further check is needed, and we can return true immediately. * *************** *** 961,965 **** /* Accept profile is specified in the request. */ if( ! mod_xhtml_strempty( content_profile )) { ! /* Accept header specifies a profile, but server does not. * Have to reject. (RFC 3236 doesn't specify a default.) * --- 961,965 ---- /* Accept profile is specified in the request. */ if( ! mod_xhtml_strempty( content_profile )) { ! /* Accept token specifies a profile, but server does not. * Have to reject. (RFC 3236 doesn't specify a default.) * *************** *** 1009,1013 **** if( mod_xhtml_strempty( content_accept->charset )) { ! /* Accept header says we accept anything. Have to check for * Accept-Charset also. */ --- 1009,1013 ---- if( mod_xhtml_strempty( content_accept->charset )) { ! /* Accept token says we accept anything. Have to check for * Accept-Charset also. */ |
From: <ru...@us...> - 2004-03-25 10:31:24
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28748 Modified Files: Doxyfile mod_xhtml_neg.c Log Message: More comment fixes. Index: Doxyfile =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/Doxyfile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Doxyfile 24 Mar 2004 10:33:40 -0000 1.1 --- Doxyfile 25 Mar 2004 10:20:37 -0000 1.2 *************** *** 24,28 **** # if some version control system is used. ! PROJECT_NUMBER = 0.91 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) --- 24,28 ---- # if some version control system is used. ! PROJECT_NUMBER = 0.92 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) *************** *** 48,52 **** # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES ! EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class --- 48,52 ---- # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES ! EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/mod_xhtml_neg.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** mod_xhtml_neg.c 25 Mar 2004 10:03:44 -0000 1.25 --- mod_xhtml_neg.c 25 Mar 2004 10:20:37 -0000 1.26 *************** *** 92,96 **** * @c XhtmlNegTypes A file extension followed by one or more matching * content-type strings \n ! * @c XhtmlNegStarsIgnore The number of stars in an Accept header which * should be ignored if we match them \n * @c XhtmlNegCache Should negotiated HTTP 1.0 requests be cacheable? --- 92,96 ---- * @c XhtmlNegTypes A file extension followed by one or more matching * content-type strings \n ! * @c XhtmlNegStarsIgnore The number of stars in an Accept token which * should be ignored if we match them \n * @c XhtmlNegCache Should negotiated HTTP 1.0 requests be cacheable? *************** *** 179,183 **** * A per-directory configuration state for this module. Here we record the * file extension to content-type mappings, whether the module should be ! * active for this directory, and the types of wildcard Accept headers that * we should ignore. */ --- 179,183 ---- * A per-directory configuration state for this module. Here we record the * file extension to content-type mappings, whether the module should be ! * active for this directory, and the types of wildcard Accept tokens that * we should ignore. */ *************** *** 200,204 **** char *charset; /**< for content-type only */ char *profile; /**< The XHTML profile, as per RFC 3236 */ ! int stars; /**< How many stars in this accept name? */ char *hashcode; /**< The hashcode to be appended to Etags */ } accept_rec; --- 200,204 ---- char *charset; /**< for content-type only */ char *profile; /**< The XHTML profile, as per RFC 3236 */ ! int stars; /**< How many stars in this accept token? */ char *hashcode; /**< The hashcode to be appended to Etags */ } accept_rec; *************** *** 211,215 **** typedef struct { char *extension; /**< Filename extension */ ! array_header *content_types; /**< Array of content accept headers */ } extension_rec; --- 211,215 ---- typedef struct { char *extension; /**< Filename extension */ ! array_header *content_types; /**< Array of content accept tokens */ } extension_rec; *************** *** 502,506 **** /** ! * Count the number of stars in an Accept content header. This helps determine * priority in case of a tie in q-value priorities. */ --- 502,506 ---- /** ! * Count the number of stars in an Accept content token. This helps determine * priority in case of a tie in q-value priorities. */ *************** *** 830,834 **** iso8859_found = 0; ! /* Scan all the accept_recs items for a name of "ISO-8859-1" (case * insensitive). If there are no matching records, construct one with * a q value of "1", as per section 14.2 of the HTTP 1.1 spec (RFC 2616). --- 830,834 ---- iso8859_found = 0; ! /* Scan all the accept_recs tokens for a name of "ISO-8859-1" (case * insensitive). If there are no matching records, construct one with * a q value of "1", as per section 14.2 of the HTTP 1.1 spec (RFC 2616). *************** *** 893,897 **** /** ! * Determine a given content_type record matches the criteria of the given * content_accept record. Returns a quality value for the given variables. * --- 893,897 ---- /** ! * Determine if a given content_type record matches the criteria of the given * content_accept record. Returns a quality value for the given variables. * *************** *** 902,906 **** * * Once we match based on names, check whether a charset is present in the ! * content_acceptrecord. If so, need to match charsets exactly. Otherwise, * no further check is needed, and we can return true immediately. * --- 902,906 ---- * * Once we match based on names, check whether a charset is present in the ! * content_accept record. If so, need to match charsets exactly. Otherwise, * no further check is needed, and we can return true immediately. * *************** *** 957,961 **** /* Accept profile is specified in the request. */ if( ! mod_xhtml_strempty( content_profile )) { ! /* Accept header specifies a profile, but server does not. * Have to reject. (RFC 3236 doesn't specify a default.) * --- 957,961 ---- /* Accept profile is specified in the request. */ if( ! mod_xhtml_strempty( content_profile )) { ! /* Accept token specifies a profile, but server does not. * Have to reject. (RFC 3236 doesn't specify a default.) * *************** *** 1005,1009 **** if( mod_xhtml_strempty( content_accept->charset )) { ! /* Accept header says we accept anything. Have to check for * Accept-Charset also. */ --- 1005,1009 ---- if( mod_xhtml_strempty( content_accept->charset )) { ! /* Accept token says we accept anything. Have to check for * Accept-Charset also. */ |
From: <ru...@us...> - 2004-03-25 10:15:26
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25105 Modified Files: mod_xhtml_neg.c Log Message: Minor const correctness fixes and other changes. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0/mod_xhtml_neg.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mod_xhtml_neg.c 25 Mar 2004 09:40:01 -0000 1.9 --- mod_xhtml_neg.c 25 Mar 2004 10:04:31 -0000 1.10 *************** *** 115,119 **** #include "http_config.h" #include "http_request.h" - #include "http_protocol.h" /* This is naughty */ --- 115,118 ---- *************** *** 121,124 **** --- 120,124 ---- #include "http_core.h" + #include "http_protocol.h" #include "http_log.h" *************** *** 1151,1155 **** /** ! * The actual content-negotiation phase of this module goes here. * * Note that due to the way we hook into the Apache handler system means --- 1151,1157 ---- /** ! * The main routine for the content-negotiation phase of this module ! * goes here. This is mainly setup, control flow and logging going on ! * here. * * Note that due to the way we hook into the Apache handler system means |
From: <ru...@us...> - 2004-03-25 10:14:42
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24933 Modified Files: mod_xhtml_neg.c Log Message: Minor const correctness fixes and other changes. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/mod_xhtml_neg.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** mod_xhtml_neg.c 25 Mar 2004 09:41:09 -0000 1.24 --- mod_xhtml_neg.c 25 Mar 2004 10:03:44 -0000 1.25 *************** *** 108,112 **** #include "http_request.h" ! /* This is naughty... */ #define CORE_PRIVATE --- 108,112 ---- #include "http_request.h" ! /* This is naughty */ #define CORE_PRIVATE *************** *** 915,922 **** accept_rec *content_accept, array_header *accept_charsets, ! char *default_charset ) { int offset = 0; ! char *content_charset; char *accept_profile, *content_profile; float charset_q, accept_q, server_q; --- 915,922 ---- accept_rec *content_accept, array_header *accept_charsets, ! const char *default_charset ) { int offset = 0; ! const char *content_charset; char *accept_profile, *content_profile; float charset_q, accept_q, server_q; *************** *** 983,988 **** * "US-ASCII". */ ! content_charset = content_type->charset; ! if( mod_xhtml_strempty( content_charset )) { /* Sigh... RFC 3023 comes into play here. For most content-types * RFC 2616 specifies the default character set should be --- 983,987 ---- * "US-ASCII". */ ! if( mod_xhtml_strempty( content_type->charset )) { /* Sigh... RFC 3023 comes into play here. For most content-types * RFC 2616 specifies the default character set should be *************** *** 993,1003 **** * See also example 8.5 of RFC 3023. */ ! if( default_charset != NULL ) { content_charset = default_charset; ! } else if( mod_xhtml_strnicmp( content_type->name, "text/xml", 8 ) == 0 ) { content_charset = DEFAULT_TEXT_XML_CHARSET; } else { content_charset = DEFAULT_CHARSET_NAME; } } --- 992,1005 ---- * See also example 8.5 of RFC 3023. */ ! if( ! mod_xhtml_strempty( default_charset )) { content_charset = default_charset; ! } else if( mod_xhtml_strnicmp( content_type->name, "text/xml", 8 ) ! == 0 ) { content_charset = DEFAULT_TEXT_XML_CHARSET; } else { content_charset = DEFAULT_CHARSET_NAME; } + } else { + content_charset = content_type->charset; } |
From: <ru...@us...> - 2004-03-25 09:51:55
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19828 Modified Files: mod_xhtml_neg.c Log Message: Added facility to default charset to the value of AddDefaultCharset directive. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/mod_xhtml_neg.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** mod_xhtml_neg.c 24 Mar 2004 11:07:14 -0000 1.23 --- mod_xhtml_neg.c 25 Mar 2004 09:41:09 -0000 1.24 *************** *** 77,81 **** * @author Nicholas Cull <ru...@us...> * @date 1 March 2004 ! * @version 0.9 * * @history --- 77,81 ---- * @author Nicholas Cull <ru...@us...> * @date 1 March 2004 ! * @version 0.92 * * @history *************** *** 85,93 **** * 0.8 First public release. \n * 0.9 ETag handled correctly for different content types. \n ! * ! * @todo ! * Pick up the AddDefaultCharset directive from the Apache core and use that ! * where appropriate instead of defaulting to ISO-8859-1. If this is not set, ! * then we fallback on existing methods. * * @directive --- 85,89 ---- * 0.8 First public release. \n * 0.9 ETag handled correctly for different content types. \n ! * 0.92 Pick up the AddDefaultCharset directive from the Apache core \n * * @directive *************** *** 111,116 **** #include "http_config.h" #include "http_request.h" ! #include "http_protocol.h" #include "http_core.h" #include "http_log.h" --- 107,116 ---- #include "http_config.h" #include "http_request.h" ! ! /* This is naughty... */ ! #define CORE_PRIVATE ! #include "http_core.h" + #include "http_protocol.h" #include "http_log.h" *************** *** 451,454 **** --- 451,475 ---- /** + * This naughty function goes digging into the Apache http_core module + * to find the default character set. + * + * @todo Is there a cleaner way to find the default charset information? + */ + + static char *get_default_charset( request_rec *r ) + { + core_dir_config *conf; + + conf = (core_dir_config *) + ap_get_module_config(r->per_dir_config, &core_module); + + if( conf->add_default_charset == ADD_DEFAULT_CHARSET_ON ) { + return conf->add_default_charset_name; + } + + return NULL; + } + + /** * Given an array of extension_rec records, find one with the given file * extension. If a match is found, return the extension_rec, otherwise *************** *** 565,568 **** --- 586,616 ---- /** + * Make an accept_rec with an explicit charset. If the record already + * contains a charset parameter, it is returned as-is. Otherwise, the + * parameter default_charset is used. Note that default_charset can be + * NULL, in which case charset will be set to the empty string. + */ + + static accept_rec *make_default_accept( pool *p, accept_rec *rec, + char *default_charset ) + { + accept_rec *newrec; + + if( ! mod_xhtml_strempty( rec->charset )) { + return rec; + } + + newrec = (accept_rec *) ap_palloc(p, sizeof (accept_rec)); + newrec->name = rec->name; + newrec->q_value = rec->q_value; + newrec->charset = ( default_charset ? default_charset : "" ); + newrec->profile = rec->profile; + newrec->stars = rec->stars; + make_etag_hashcode( p, newrec ); + + return newrec; + } + + /** * Merge vlist_validators from different modules. This code is adapted * from code in http_protocol.c in the Apache 1.3 core. *************** *** 821,825 **** static float charsets_match( array_header *accept_charsets, ! char *content_charset ) { accept_rec *list, *item; --- 869,873 ---- static float charsets_match( array_header *accept_charsets, ! const char *content_charset ) { accept_rec *list, *item; *************** *** 866,870 **** static float types_match( accept_rec *content_type, accept_rec *content_accept, ! array_header *accept_charsets ) { int offset = 0; --- 914,919 ---- static float types_match( accept_rec *content_type, accept_rec *content_accept, ! array_header *accept_charsets, ! char *default_charset ) { int offset = 0; *************** *** 944,948 **** * See also example 8.5 of RFC 3023. */ ! if( mod_xhtml_strnicmp( content_type->name, "text/xml", 8 ) == 0 ) { content_charset = DEFAULT_TEXT_XML_CHARSET; } else { --- 993,999 ---- * See also example 8.5 of RFC 3023. */ ! if( default_charset != NULL ) { ! content_charset = default_charset; ! } else if( mod_xhtml_strnicmp( content_type->name, "text/xml", 8 ) == 0 ) { content_charset = DEFAULT_TEXT_XML_CHARSET; } else { *************** *** 978,982 **** static accept_rec *best_match(array_header *accept_type, array_header *content_type, array_header *accept_charset, ! int stars_to_match, xhtml_neg_state *xns) { float best_q = 0.0f; --- 1029,1034 ---- static accept_rec *best_match(array_header *accept_type, array_header *content_type, array_header *accept_charset, ! char *default_charset, int stars_to_match, ! xhtml_neg_state *xns, pool *p) { float best_q = 0.0f; *************** *** 1025,1029 **** curr_accept = &list_accept[j]; curr_stars = curr_accept->stars; ! curr_q = types_match( curr_content, curr_accept, accept_charset ); #ifdef MOD_XHTML_NEG_DEBUG --- 1077,1082 ---- curr_accept = &list_accept[j]; curr_stars = curr_accept->stars; ! curr_q = types_match( curr_content, curr_accept, accept_charset, ! default_charset ); #ifdef MOD_XHTML_NEG_DEBUG *************** *** 1056,1061 **** } ! /* Return the reconstructed content-type header. */ ! return best_type; } --- 1109,1114 ---- } ! /* Return the reconstructed content-type record. */ ! return make_default_accept( p, best_type, default_charset ); } *************** *** 1090,1094 **** /** ! * The actual content-negotiation phase of this module goes here. */ --- 1143,1149 ---- /** ! * The main routine for the content-negotiation phase of this module ! * goes here. This is mainly setup, control flow and logging going on ! * here. */ *************** *** 1097,1101 **** array_header *extensions, *accept_types, *accept_charsets, *content_types; const char *content_accept, *accept_charset; ! char *filename, *extension, *logmessage; xhtml_dir_config *conf; xhtml_neg_state *xns; --- 1152,1156 ---- array_header *extensions, *accept_types, *accept_charsets, *content_types; const char *content_accept, *accept_charset; ! char *filename, *extension, *logmessage, *default_charset; xhtml_dir_config *conf; xhtml_neg_state *xns; *************** *** 1174,1177 **** --- 1229,1233 ---- content_accept = ap_table_get(hdrs, "Accept"); accept_charset = ap_table_get(hdrs, "Accept-Charset"); + default_charset = get_default_charset( r ); /* More logging... */ *************** *** 1182,1185 **** --- 1238,1243 ---- "Accept charset is: ", (accept_charset ? accept_charset : ""), "\n", + "Default charset is: ", + (default_charset ? default_charset : ""), "\n", NULL); *************** *** 1193,1198 **** /* Find accept_rec of best result, if any. */ result_rec = best_match( accept_types, content_types, ! accept_charsets, conf->stars_ignore, ! xns ); if( result_rec != NULL ) { --- 1251,1256 ---- /* Find accept_rec of best result, if any. */ result_rec = best_match( accept_types, content_types, ! accept_charsets, default_charset, ! conf->stars_ignore, xns, r->pool ); if( result_rec != NULL ) { |
From: <ru...@us...> - 2004-03-25 09:50:54
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19646 Modified Files: Makefile mod_xhtml_neg.c Log Message: Added facility to default charset to the value of AddDefaultCharset directive. Index: Makefile =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile 13 Mar 2004 07:07:49 -0000 1.1.1.1 --- Makefile 25 Mar 2004 09:40:01 -0000 1.2 *************** *** 7,11 **** clean: ! $(RM) -rf *.o distclean: clean --- 7,11 ---- clean: ! $(RM) -rf *.o *.la *.slo distclean: clean Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0/mod_xhtml_neg.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mod_xhtml_neg.c 24 Mar 2004 11:06:40 -0000 1.8 --- mod_xhtml_neg.c 25 Mar 2004 09:40:01 -0000 1.9 *************** *** 77,81 **** * @author Nicholas Cull <ru...@us...> * @date 1 March 2004 ! * @version 0.91 * * @history --- 77,81 ---- * @author Nicholas Cull <ru...@us...> * @date 1 March 2004 ! * @version 0.92 * * @history *************** *** 85,93 **** * 0.8 First public release. \n * 0.9 ETag handled correctly for different content types. \n ! * ! * @todo ! * Pick up the AddDefaultCharset directive from the Apache core and use that ! * where appropriate instead of defaulting to ISO-8859-1. If this is not set, ! * then we fallback on existing methods. * * @directive --- 85,89 ---- * 0.8 First public release. \n * 0.9 ETag handled correctly for different content types. \n ! * 0.92 Pick up the AddDefaultCharset directive from the Apache core \n * * @directive *************** *** 120,123 **** --- 116,123 ---- #include "http_request.h" #include "http_protocol.h" + + /* This is naughty */ + #define CORE_PRIVATE + #include "http_core.h" #include "http_log.h" *************** *** 453,456 **** --- 453,477 ---- /** + * This naughty function goes digging into the Apache http_core module + * to find the default character set. + * + * @todo Is there a cleaner way to find the default charset information? + */ + + static const char *get_default_charset( request_rec *r ) + { + core_dir_config *conf; + + conf = (core_dir_config *) + ap_get_module_config(r->per_dir_config, &core_module); + + if( conf->add_default_charset == ADD_DEFAULT_CHARSET_ON ) { + return conf->add_default_charset_name; + } + + return NULL; + } + + /** * Given an array of extension_rec records, find one with the given file * extension. If a match is found, return the extension_rec, otherwise *************** *** 567,570 **** --- 588,619 ---- /** + * Make an accept_rec with an explicit charset. If the record already + * contains a charset parameter, it is returned as-is. Otherwise, the + * parameter default_charset is used. Note that default_charset can be + * NULL, in which case charset will be set to the empty string. + */ + + static accept_rec *make_default_accept( apr_pool_t *p, accept_rec *rec, + const char *default_charset ) + { + accept_rec *newrec; + + if( ! mod_xhtml_strempty( rec->charset )) { + return rec; + } + + newrec = (accept_rec *) apr_palloc(p, sizeof (accept_rec)); + newrec->name = rec->name; + newrec->q_value = rec->q_value; + newrec->charset = ( default_charset ? + apr_pstrdup( p, default_charset ) : "" ); + newrec->profile = rec->profile; + newrec->stars = rec->stars; + make_etag_hashcode( p, newrec ); + + return newrec; + } + + /** * Merge vlist_validators from different modules. This code is adapted * from code in http_protocol.c in the Apache 1.3 core. *************** *** 824,828 **** static float charsets_match( apr_array_header_t *accept_charsets, ! char *content_charset ) { accept_rec *list, *item; --- 873,877 ---- static float charsets_match( apr_array_header_t *accept_charsets, ! const char *content_charset ) { accept_rec *list, *item; *************** *** 869,876 **** static float types_match( accept_rec *content_type, accept_rec *content_accept, ! apr_array_header_t *accept_charsets ) { int offset = 0; ! char *content_charset; char *accept_profile, *content_profile; float charset_q, accept_q, server_q; --- 918,926 ---- static float types_match( accept_rec *content_type, accept_rec *content_accept, ! apr_array_header_t *accept_charsets, ! const char *default_charset ) { int offset = 0; ! const char *content_charset; char *accept_profile, *content_profile; float charset_q, accept_q, server_q; *************** *** 937,942 **** * "US-ASCII". */ ! content_charset = content_type->charset; ! if( mod_xhtml_strempty( content_charset )) { /* Sigh... RFC 3023 comes into play here. For most content-types * RFC 2616 specifies the default character set should be --- 987,991 ---- * "US-ASCII". */ ! if( mod_xhtml_strempty( content_type->charset )) { /* Sigh... RFC 3023 comes into play here. For most content-types * RFC 2616 specifies the default character set should be *************** *** 947,955 **** * See also example 8.5 of RFC 3023. */ ! if( mod_xhtml_strnicmp( content_type->name, "text/xml", 8 ) == 0 ) { content_charset = DEFAULT_TEXT_XML_CHARSET; } else { content_charset = DEFAULT_CHARSET_NAME; } } --- 996,1009 ---- * See also example 8.5 of RFC 3023. */ ! if( ! mod_xhtml_strempty( default_charset )) { ! content_charset = default_charset; ! } else if( mod_xhtml_strnicmp( content_type->name, "text/xml", 8 ) ! == 0 ) { content_charset = DEFAULT_TEXT_XML_CHARSET; } else { content_charset = DEFAULT_CHARSET_NAME; } + } else { + content_charset = content_type->charset; } *************** *** 982,986 **** apr_array_header_t *content_type, apr_array_header_t *accept_charset, ! int stars_to_match, xhtml_neg_state *xns) { float best_q = 0.0f; --- 1036,1041 ---- apr_array_header_t *content_type, apr_array_header_t *accept_charset, ! const char *default_charset, int stars_to_match, ! xhtml_neg_state *xns, apr_pool_t *p) { float best_q = 0.0f; *************** *** 1030,1034 **** curr_accept = &list_accept[j]; curr_stars = curr_accept->stars; ! curr_q = types_match( curr_content, curr_accept, accept_charset ); #ifdef MOD_XHTML_NEG_DEBUG --- 1085,1090 ---- curr_accept = &list_accept[j]; curr_stars = curr_accept->stars; ! curr_q = types_match( curr_content, curr_accept, accept_charset, ! default_charset ); #ifdef MOD_XHTML_NEG_DEBUG *************** *** 1061,1066 **** } ! /* Return the reconstructed content-type header. */ ! return best_type; } --- 1117,1122 ---- } ! /* Return the reconstructed content-type record. */ ! return make_default_accept( p, best_type, default_charset ); } *************** *** 1107,1111 **** apr_array_header_t *extensions, *accept_types, *accept_charsets, *content_types; ! const char *content_accept, *accept_charset; char *filename, *extension, *logmessage; apr_size_t logsize; --- 1163,1167 ---- apr_array_header_t *extensions, *accept_types, *accept_charsets, *content_types; ! const char *content_accept, *accept_charset, *default_charset; char *filename, *extension, *logmessage; apr_size_t logsize; *************** *** 1171,1174 **** --- 1227,1231 ---- content_accept = apr_table_get(hdrs, "Accept"); accept_charset = apr_table_get(hdrs, "Accept-Charset"); + default_charset = get_default_charset( r ); /* More logging... */ *************** *** 1179,1182 **** --- 1236,1241 ---- "Accept charset is: ", (accept_charset ? accept_charset : ""), "\n", + "Default charset is: ", + (default_charset ? default_charset : ""), "\n", NULL); *************** *** 1191,1196 **** /* Find accept_rec of best result, if any. */ result_rec = best_match( accept_types, content_types, ! accept_charsets, conf->stars_ignore, ! xns ); if( result_rec != NULL ) { --- 1250,1255 ---- /* Find accept_rec of best result, if any. */ result_rec = best_match( accept_types, content_types, ! accept_charsets, default_charset, ! conf->stars_ignore, xns, r->pool ); if( result_rec != NULL ) { |
From: <ru...@us...> - 2004-03-24 11:17:51
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31291 Modified Files: mod_xhtml_neg.c Log Message: Minor updates at the file and main page level. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/mod_xhtml_neg.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** mod_xhtml_neg.c 24 Mar 2004 10:33:40 -0000 1.22 --- mod_xhtml_neg.c 24 Mar 2004 11:07:14 -0000 1.23 *************** *** 77,80 **** --- 77,81 ---- * @author Nicholas Cull <ru...@us...> * @date 1 March 2004 + * @version 0.9 * * @history *************** *** 85,88 **** --- 86,94 ---- * 0.9 ETag handled correctly for different content types. \n * + * @todo + * Pick up the AddDefaultCharset directive from the Apache core and use that + * where appropriate instead of defaulting to ISO-8859-1. If this is not set, + * then we fallback on existing methods. + * * @directive * @c XhtmlNegActive Is this module enabled? Defaults to no. \n *************** *** 98,102 **** /** * @file ! * The main source file for the mod_xhtml_neg module. */ --- 104,109 ---- /** * @file ! * The main source file for the mod_xhtml_neg module. This file implements ! * the module for Apache 1.3.x servers. */ *************** *** 727,731 **** * basic structure of a list of items of the format: * ! * name; q=N; charset=TEXT; profile="URL" * * Since this header is very similar in structure to the Accept-Charset --- 734,738 ---- * basic structure of a list of items of the format: * ! * name; q=N; charset=TEXT; profile="URI" * * Since this header is very similar in structure to the Accept-Charset |
From: <ru...@us...> - 2004-03-24 11:17:30
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31035 Modified Files: mod_xhtml_neg.c Log Message: Minor updates at the file and main page level. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0/mod_xhtml_neg.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mod_xhtml_neg.c 24 Mar 2004 10:34:06 -0000 1.7 --- mod_xhtml_neg.c 24 Mar 2004 11:06:40 -0000 1.8 *************** *** 77,80 **** --- 77,81 ---- * @author Nicholas Cull <ru...@us...> * @date 1 March 2004 + * @version 0.91 * * @history *************** *** 85,88 **** --- 86,94 ---- * 0.9 ETag handled correctly for different content types. \n * + * @todo + * Pick up the AddDefaultCharset directive from the Apache core and use that + * where appropriate instead of defaulting to ISO-8859-1. If this is not set, + * then we fallback on existing methods. + * * @directive * @c XhtmlNegActive Is this module enabled? Defaults to no. \n *************** *** 98,102 **** /** * @file ! * The main source file for the mod_xhtml_neg module. */ --- 104,109 ---- /** * @file ! * The main source file for the mod_xhtml_neg module. This file implements ! * the module for Apache 2.0.x servers. */ *************** *** 211,216 **** } extension_rec; - /* String utility functions start here. */ - /* * Utility functions for strings, since we can't rely on these functions being --- 218,221 ---- *************** *** 633,637 **** } ! /* Following code modified from mod_negotiate.c */ /** --- 638,642 ---- } ! /* Following code modified from mod_negotiate.c */ /** *************** *** 731,735 **** * basic structure of a list of items of the format: * ! * name; q=N; charset=TEXT; profile="URL" * * Since this header is very similar in structure to the Accept-Charset --- 736,740 ---- * basic structure of a list of items of the format: * ! * name; q=N; charset=TEXT; profile="URI" * * Since this header is very similar in structure to the Accept-Charset |
From: <ru...@us...> - 2004-03-24 10:44:51
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23471 Modified Files: mod_xhtml_neg.c Added Files: Doxyfile Log Message: Clean up Doxygen source. --- NEW FILE: Doxyfile --- # Doxyfile 1.2.15 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # General configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = "XHTML Negotiation Module" # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = 0.91 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, # German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, # Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish. OUTPUT_LANGUAGE = English # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = YES # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these class will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited # members of a class in the documentation of that class as if those members were # ordinary class members. Constructors, destructors and assignment operators of # the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. It is allowed to use relative paths in the argument list. STRIP_FROM_PATH = # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower case letters. If set to YES upper case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # users are adviced to set this option to NO. CASE_SENSE_NAMES = YES # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explict @brief command for a brief description. JAVADOC_AUTOBRIEF = YES # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # reimplements. INHERIT_DOCS = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = "history=\par Version History:\n" \ "directive=\par Directives:\n" # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consist of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 32 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. # For instance some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources # only. Doxygen will then generate output that is more tailored for Java. # For instance namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = mod_xhtml_neg.c # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp # *.h++ *.idl *.odl FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories # that are symbolic links (a Unix filesystem feature) are excluded from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command <filter> <input-file>, where <filter> # is the value of the INPUT_FILTER tag, and <input-file> is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. INPUT_FILTER = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse. FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the Html help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, # or Internet explorer 4.0+). Note that for large projects the tree generation # can take a very long time. In such cases it is better to disable this feature. # Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimised for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assigments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_XML = NO #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_PREDEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line and do not end with a semicolon. Such function macros are typically # used for boiler-plate code, and will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::addtions related to external references #--------------------------------------------------------------------------- # The TAGFILES tag can be used to specify one or more tagfiles. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or # super classes. Setting the tag to NO turns the diagrams off. Note that this # option is superceded by the HAVE_DOT option below. This is only a fallback. It is # recommended to install and use dot, since it yield more powerful graphs. CLASS_DIAGRAMS = NO # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = YES # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found on the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermedate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::addtions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO # The CGI_NAME tag should be the name of the CGI script that # starts the search engine (doxysearch) with the correct parameters. # A script with this name will be generated by doxygen. CGI_NAME = search.cgi # The CGI_URL tag should be the absolute URL to the directory where the # cgi binaries are located. See the documentation of your http daemon for # details. CGI_URL = # The DOC_URL tag should be the absolute URL to the directory where the # documentation is located. If left blank the absolute path to the # documentation, with file:// prepended to it, will be used. DOC_URL = # The DOC_ABSPATH tag should be the absolute path to the directory where the # documentation is located. If left blank the directory on the local machine # will be used. DOC_ABSPATH = # The BIN_ABSPATH tag must point to the directory where the doxysearch binary # is installed. BIN_ABSPATH = /usr/local/bin/ # The EXT_DOC_PATHS tag can be used to specify one or more paths to # documentation generated for other projects. This allows doxysearch to search # the documentation for these projects as well. EXT_DOC_PATHS = Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0/mod_xhtml_neg.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mod_xhtml_neg.c 24 Mar 2004 10:25:55 -0000 1.6 --- mod_xhtml_neg.c 24 Mar 2004 10:34:06 -0000 1.7 *************** *** 58,62 **** /** ! * @file * mod_xhtml_neg -- a module to negotiate an appropriate content-type for * XHTML content. Clients that request application/xhtml+xml will be returned --- 58,62 ---- /** ! * @mainpage XHTML Negotiation Module * mod_xhtml_neg -- a module to negotiate an appropriate content-type for * XHTML content. Clients that request application/xhtml+xml will be returned *************** *** 78,87 **** * @date 1 March 2004 * ! * @history: ! * 0.5 Basic handling of Accept header ! * 0.6 Added charset handling ! * 0.7 Added profile handling, fixed up default charset for text/xml ! * 0.8 First public release. ! * 0.9 ETag handled correctly for different content types. * * @directive --- 78,87 ---- * @date 1 March 2004 * ! * @history ! * 0.5 Basic handling of Accept header \n ! * 0.6 Added charset handling \n ! * 0.7 Added profile handling, fixed up default charset for text/xml \n ! * 0.8 First public release. \n ! * 0.9 ETag handled correctly for different content types. \n * * @directive *************** *** 96,99 **** --- 96,104 ---- */ + /** + * @file + * The main source file for the mod_xhtml_neg module. + */ + #include "apr.h" #include "apr_strings.h" |
From: <ru...@us...> - 2004-03-24 10:44:17
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23320 Modified Files: mod_xhtml_neg.c Added Files: Doxyfile Log Message: Clean up Doxygen source. --- NEW FILE: Doxyfile --- # Doxyfile 1.2.15 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # General configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = "XHTML Negotiation Module" # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = 0.91 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, # German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, # Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish. OUTPUT_LANGUAGE = English # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = YES # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these class will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited # members of a class in the documentation of that class as if those members were # ordinary class members. Constructors, destructors and assignment operators of # the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. It is allowed to use relative paths in the argument list. STRIP_FROM_PATH = # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower case letters. If set to YES upper case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # users are adviced to set this option to NO. CASE_SENSE_NAMES = YES # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explict @brief command for a brief description. JAVADOC_AUTOBRIEF = YES # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # reimplements. INHERIT_DOCS = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = "history=\par Version History:\n" \ "directive=\par Directives:\n" # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consist of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 32 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. # For instance some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources # only. Doxygen will then generate output that is more tailored for Java. # For instance namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = mod_xhtml_neg.c # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp # *.h++ *.idl *.odl FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories # that are symbolic links (a Unix filesystem feature) are excluded from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command <filter> <input-file>, where <filter> # is the value of the INPUT_FILTER tag, and <input-file> is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. INPUT_FILTER = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse. FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the Html help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, # or Internet explorer 4.0+). Note that for large projects the tree generation # can take a very long time. In such cases it is better to disable this feature. # Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimised for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assigments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_XML = NO #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_PREDEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line and do not end with a semicolon. Such function macros are typically # used for boiler-plate code, and will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::addtions related to external references #--------------------------------------------------------------------------- # The TAGFILES tag can be used to specify one or more tagfiles. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or # super classes. Setting the tag to NO turns the diagrams off. Note that this # option is superceded by the HAVE_DOT option below. This is only a fallback. It is # recommended to install and use dot, since it yield more powerful graphs. CLASS_DIAGRAMS = NO # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = YES # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found on the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermedate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::addtions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO # The CGI_NAME tag should be the name of the CGI script that # starts the search engine (doxysearch) with the correct parameters. # A script with this name will be generated by doxygen. CGI_NAME = search.cgi # The CGI_URL tag should be the absolute URL to the directory where the # cgi binaries are located. See the documentation of your http daemon for # details. CGI_URL = # The DOC_URL tag should be the absolute URL to the directory where the # documentation is located. If left blank the absolute path to the # documentation, with file:// prepended to it, will be used. DOC_URL = # The DOC_ABSPATH tag should be the absolute path to the directory where the # documentation is located. If left blank the directory on the local machine # will be used. DOC_ABSPATH = # The BIN_ABSPATH tag must point to the directory where the doxysearch binary # is installed. BIN_ABSPATH = /usr/local/bin/ # The EXT_DOC_PATHS tag can be used to specify one or more paths to # documentation generated for other projects. This allows doxysearch to search # the documentation for these projects as well. EXT_DOC_PATHS = Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/mod_xhtml_neg.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** mod_xhtml_neg.c 24 Mar 2004 09:25:54 -0000 1.21 --- mod_xhtml_neg.c 24 Mar 2004 10:33:40 -0000 1.22 *************** *** 57,61 **** */ ! /* * mod_xhtml_neg -- a module to negotiate an appropriate content-type for * XHTML content. Clients that request application/xhtml+xml will be returned --- 57,62 ---- */ ! /** ! * @mainpage XHTML Negotiation Module * mod_xhtml_neg -- a module to negotiate an appropriate content-type for * XHTML content. Clients that request application/xhtml+xml will be returned *************** *** 74,98 **** * adding our own suffix to Etag headers when a negotiation is successful. * ! * Author: Nicholas Cull <ru...@us...> ! * Date: 1 March 2004 ! * ! * Version history: ! * ! * 0.5 Basic handling of Accept header ! * 0.6 Added charset handling ! * 0.7 Added profile handling, fixed up default charset for text/xml ! * 0.8 First public release. ! * 0.9 ETag handled correctly for different content types. * ! * Directives: * ! * XhtmlNegActive Is this module enabled? Defaults to no. ! * XhtmlNegLog A file name for an output log file ! * XhtmlNegTypes A file extension followed by one or more matching ! * content-type strings ! * XhtmlNegStarsIgnore The number of stars in an Accept header which should ! * be ignored if we match them ! * XhtmlNegCache Should negotiated HTTP 1.0 requests be cacheable? ! * Defaults to no */ --- 75,102 ---- * adding our own suffix to Etag headers when a negotiation is successful. * ! * @author Nicholas Cull <ru...@us...> ! * @date 1 March 2004 * ! * @history ! * 0.5 Basic handling of Accept header \n ! * 0.6 Added charset handling \n ! * 0.7 Added profile handling, fixed up default charset for text/xml \n ! * 0.8 First public release. \n ! * 0.9 ETag handled correctly for different content types. \n * ! * @directive ! * @c XhtmlNegActive Is this module enabled? Defaults to no. \n ! * @c XhtmlNegLog A file name for an output log file \n ! * @c XhtmlNegTypes A file extension followed by one or more matching ! * content-type strings \n ! * @c XhtmlNegStarsIgnore The number of stars in an Accept header which ! * should be ignored if we match them \n ! * @c XhtmlNegCache Should negotiated HTTP 1.0 requests be cacheable? ! * Defaults to no \n ! */ ! ! /** ! * @file ! * The main source file for the mod_xhtml_neg module. */ *************** *** 161,166 **** char *fname; /**< Name of the log file we write to, if any */ int log_fd; /**< File descriptor of the log file, or -1 */ ! http_caching cache; /**< Flag to caching negotiated content ! * in HTTP 1.0 */ } xhtml_neg_state; --- 165,170 ---- char *fname; /**< Name of the log file we write to, if any */ int log_fd; /**< File descriptor of the log file, or -1 */ ! http_caching cache; /**< Flag to cache negotiated content in ! * HTTP 1.0 requests */ } xhtml_neg_state; *************** *** 181,185 **** /** * Record of available info on a media type specified by the client. ! * We also use them for encodings and profiles). */ --- 185,189 ---- /** * Record of available info on a media type specified by the client. ! * We also use them for encodings and profiles. */ |
From: <ru...@us...> - 2004-03-24 10:36:31
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21686 Modified Files: mod_xhtml_neg.c Log Message: Doxygenise the source code. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0/mod_xhtml_neg.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mod_xhtml_neg.c 15 Mar 2004 04:29:17 -0000 1.5 --- mod_xhtml_neg.c 24 Mar 2004 10:25:55 -0000 1.6 *************** *** 57,61 **** */ ! /* * mod_xhtml_neg -- a module to negotiate an appropriate content-type for * XHTML content. Clients that request application/xhtml+xml will be returned --- 57,62 ---- */ ! /** ! * @file * mod_xhtml_neg -- a module to negotiate an appropriate content-type for * XHTML content. Clients that request application/xhtml+xml will be returned *************** *** 74,82 **** * adding our own suffix to Etag headers when a negotiation is successful. * ! * Author: Nicholas Cull <ru...@us...> ! * Date: 1 March 2004 ! * ! * Version history: * * 0.5 Basic handling of Accept header * 0.6 Added charset handling --- 75,82 ---- * adding our own suffix to Etag headers when a negotiation is successful. * ! * @author Nicholas Cull <ru...@us...> ! * @date 1 March 2004 * + * @history: * 0.5 Basic handling of Accept header * 0.6 Added charset handling *************** *** 85,98 **** * 0.9 ETag handled correctly for different content types. * ! * Directives: ! * ! * XhtmlNegActive Is this module enabled? Defaults to no. ! * XhtmlNegLog A file name for an output log file ! * XhtmlNegTypes A file extension followed by one or more matching ! * content-type strings ! * XhtmlNegStarsIgnore The number of stars in an Accept header which should ! * be ignored if we match them ! * XhtmlNegCache Should negotiated HTTP 1.0 requests be cacheable? ! * Defaults to no */ --- 85,97 ---- * 0.9 ETag handled correctly for different content types. * ! * @directive ! * @c XhtmlNegActive Is this module enabled? Defaults to no. \n ! * @c XhtmlNegLog A file name for an output log file \n ! * @c XhtmlNegTypes A file extension followed by one or more matching ! * content-type strings \n ! * @c XhtmlNegStarsIgnore The number of stars in an Accept header which should ! * be ignored if we match them \n ! * @c XhtmlNegCache Should negotiated HTTP 1.0 requests be cacheable? ! * Defaults to no \n */ *************** *** 112,160 **** #include "http_log.h" static int xfer_flags = (APR_WRITE | APR_APPEND | APR_CREATE); static apr_fileperms_t xfer_perms = APR_OS_DEFAULT; /* #define MOD_XHTML_NEG_DEBUG 1 */ #define DEFAULT_CHARSET_NAME "iso-8859-1" #define DEFAULT_TEXT_XML_CHARSET "us-ascii" ! #define ACTIVE_ON 1 ! #define ACTIVE_OFF 0 ! #define ACTIVE_DONTCARE 2 - #define CACHE_ON 1 - #define CACHE_OFF 0 - #define CACHE_DONTCARE 2 module AP_MODULE_DECLARE_DATA xhtml_neg_module; typedef struct { ! char *fname; /* Name of the log file we write to, if any */ ! apr_file_t *log_fd; /* File descriptor of the log file */ ! int cache_negotiated; /* Flag to caching negotiated content in HTTP 1.0 */ } xhtml_neg_state; typedef struct { ! int active; /* Is the module active for this directory? */ ! apr_array_header_t *extensions; /* An array of extension_rec records */ ! int stars_ignore; /* How many content-type stars before we ignore */ } xhtml_dir_config; ! /* ! * Record of available info on a media type specified by the client ! * (we also use 'em for encodings and languages) */ typedef struct { ! char *name; /* MUST be lowercase */ ! float q_value; /* Quality value, from 0 to 1. */ ! char *charset; /* for content-type only */ ! char *profile; /* The XHTML profile, as per RFC 3236 */ ! int stars; /* How many stars in this accept name? */ ! char *hashcode; } accept_rec; ! /* * Record the maps a file extension to zero or more content-types. The content * types themselves are stored as an array of accept_rec records. --- 111,200 ---- #include "http_log.h" + /** Read/write flags used when opening the log file. */ static int xfer_flags = (APR_WRITE | APR_APPEND | APR_CREATE); + + /** Permission flags used when opening the log file. */ static apr_fileperms_t xfer_perms = APR_OS_DEFAULT; /* #define MOD_XHTML_NEG_DEBUG 1 */ + + /** The default HTTP character set for most content types. */ #define DEFAULT_CHARSET_NAME "iso-8859-1" + + /** The default HTTP character set for text/xml and text/xml-external-entity + * content types. */ #define DEFAULT_TEXT_XML_CHARSET "us-ascii" ! /** ! * Enumeration for determining whether processing should be enabled for ! * this module. By default, we set the directory config state to ! * active_dontcare, meaning the value hasn't been explicitly set. When ! * it is set by XhtmlNegActive, the directory config will be set to either ! * active_on or active_off. ! */ ! typedef enum { ! active_on = 1, /**< processing should be active */ ! active_off = 0, /**< processing should not be active */ ! active_dontcare = 2 /**< default processing state (not active) */ ! } xhtml_neg_active; ! ! /** ! * Enumeration for determining whether HTTP 1.0 caching should be allowed ! * for negotiated documents. By default, we set the server config state to ! * caching_dontcare, meaning the value hasn't been explicitly set. When it ! * set by the XhtmlNegCache parameter, the server config will be set to ! * either caching_on or caching_off. ! */ ! typedef enum { ! caching_on = 1, /**< HTTP 1.0 caching should be active */ ! caching_off = 0, /**< HTTP 1.0 caching should not be active */ ! caching_dontcare = 2 /**< default processing state (not active) */ ! } http_caching; module AP_MODULE_DECLARE_DATA xhtml_neg_module; + /** + * A per-server configuration state for this module. Here we record any + * log file that we want to write to, the open file descriptor, and the + * caching state for HTTP 1.0 requests. + */ + typedef struct { ! char *fname; /**< Name of the log file we write to, if any */ ! apr_file_t *log_fd; /**< File descriptor of the log file */ ! http_caching cache; /**< Flag to cache negotiated content in ! * HTTP 1.0 requests */ } xhtml_neg_state; + /** + * A per-directory configuration state for this module. Here we record the + * file extension to content-type mappings, whether the module should be + * active for this directory, and the types of wildcard Accept headers that + * we should ignore. + */ + typedef struct { ! xhtml_neg_active active; /**< Is the module active for this directory? */ ! apr_array_header_t *extensions; /**< An array of extension_rec records */ ! int stars_ignore; /**< How many content-type stars before we ignore */ } xhtml_dir_config; ! /** ! * Record of available info on a media type specified by the client. ! * We also use them for encodings and profiles. */ typedef struct { ! char *name; /**< MUST be lowercase */ ! float q_value; /**< Quality value, from 0 to 1. */ ! char *charset; /**< for content-type only */ ! char *profile; /**< The XHTML profile, as per RFC 3236 */ ! int stars; /**< How many stars in this accept name? */ ! char *hashcode; /**< The hashcode to be appended to Etags */ } accept_rec; ! /** * Record the maps a file extension to zero or more content-types. The content * types themselves are stored as an array of accept_rec records. *************** *** 162,167 **** typedef struct { ! char *extension; /* Filename extension */ ! apr_array_header_t *content_types; /* Array of content accept headers */ } extension_rec; --- 202,207 ---- typedef struct { ! char *extension; /**< Filename extension */ ! apr_array_header_t *content_types; /**< Array of content accept headers */ } extension_rec; *************** *** 173,181 **** */ ! /* * Test whether a string is empty without having to do a full scan of the * string just to return a length, as per strlen. * ! * Todo: could macro-ise this function. */ --- 213,221 ---- */ ! /** * Test whether a string is empty without having to do a full scan of the * string just to return a length, as per strlen. * ! * @todo could macro-ise this function. */ *************** *** 184,188 **** } ! /* * Re-implement strlen, since relying on it being included somewhere along * the way appears to be unsafe. --- 224,228 ---- } ! /** * Re-implement strlen, since relying on it being included somewhere along * the way appears to be unsafe. *************** *** 203,207 **** } ! /* * Compare one string against another in a case-sensitive manner. */ --- 243,247 ---- } ! /** * Compare one string against another in a case-sensitive manner. */ *************** *** 237,241 **** } ! /* * Compare one string against another in a case-insensitive manner. */ --- 277,281 ---- } ! /** * Compare one string against another in a case-insensitive manner. */ *************** *** 280,284 **** } ! /* * Compare strings up to a specified limit in a case-sensitive manner. * If a NULL byte is encountered, finish comparing at that character. --- 320,324 ---- } ! /** * Compare strings up to a specified limit in a case-sensitive manner. * If a NULL byte is encountered, finish comparing at that character. *************** *** 317,321 **** } ! /* * Compare strings up to a specified limit in a case-insensitive manner. * If a NULL byte is encountered, finish comparing at that character. --- 357,361 ---- } ! /** * Compare strings up to a specified limit in a case-insensitive manner. * If a NULL byte is encountered, finish comparing at that character. *************** *** 364,368 **** } ! /* * Determines if the given string end with the given suffix. Case matching * can be enabled or disabled. --- 404,408 ---- } ! /** * Determines if the given string end with the given suffix. Case matching * can be enabled or disabled. *************** *** 402,406 **** } ! /* * Given an array of extension_rec records, find one with the given file * extension. If a match is found, return the extension_rec, otherwise --- 442,446 ---- } ! /** * Given an array of extension_rec records, find one with the given file * extension. If a match is found, return the extension_rec, otherwise *************** *** 432,436 **** } ! /* * Count the number of stars in an Accept content header. This helps determine * priority in case of a tie in q-value priorities. --- 472,476 ---- } ! /** * Count the number of stars in an Accept content header. This helps determine * priority in case of a tie in q-value priorities. *************** *** 454,458 **** } ! /* * Reconstruct the original content-type, if required due to special "charset" * values. Normally the content-type will be a plain string without charset --- 494,498 ---- } ! /** * Reconstruct the original content-type, if required due to special "charset" * values. Normally the content-type will be a plain string without charset *************** *** 461,465 **** * content-type string. * ! * Todo: should we send the "profile" parameter as well? */ --- 501,505 ---- * content-type string. * ! * @todo should we send the "profile" parameter as well? */ *************** *** 481,485 **** } ! /* * Make a simple hash code for the given accept_rec structure. This allows * us to generate unique Etags for accepted content-types. The Etag --- 521,525 ---- } ! /** * Make a simple hash code for the given accept_rec structure. This allows * us to generate unique Etags for accepted content-types. The Etag *************** *** 491,496 **** * concatenated as one long string. * ! * Todo: ! * If the content-type returned ever includes the "profile" parameter, * include it as part of the hash code. */ --- 531,535 ---- * concatenated as one long string. * ! * @todo If the content-type returned ever includes the "profile" parameter, * include it as part of the hash code. */ *************** *** 517,521 **** } ! /* * Merge vlist_validators from different modules. This code is adapted * from code in http_protocol.c in the Apache 1.3 core. --- 556,560 ---- } ! /** * Merge vlist_validators from different modules. This code is adapted * from code in http_protocol.c in the Apache 1.3 core. *************** *** 567,571 **** ! /* * For a given filename, scan through an array of extension_rec records * until we find a match. The first match wins. If no match is found, --- 606,610 ---- ! /** * For a given filename, scan through an array of extension_rec records * until we find a match. The first match wins. If no match is found, *************** *** 589,595 **** } ! /* ! * Following code modified from mod_negotiate.c ! * * Get a single mime type entry --- one media type and parameters; * enter the values we recognize into the argument accept_rec --- 628,634 ---- } ! /* Following code modified from mod_negotiate.c */ ! ! /** * Get a single mime type entry --- one media type and parameters; * enter the values we recognize into the argument accept_rec *************** *** 681,686 **** } ! /* ! * Dealing with Accept header lines ... * * The Accept request header is handled by do_accept_line() - it has the --- 720,725 ---- } ! /** ! * Deal with Accept header lines. * * The Accept request header is handled by do_accept_line() - it has the *************** *** 716,720 **** } ! /* * Deal explicitly with Accept-Charset headers. There is an extra record * inserted when neither "*" nor "ISO-8859-1" are mentioned. --- 755,759 ---- } ! /** * Deal explicitly with Accept-Charset headers. There is an extra record * inserted when neither "*" nor "ISO-8859-1" are mentioned. *************** *** 769,773 **** } ! /* * Look for a matching charset within the given array of accept_recs. If we * find a match, return the corresponding q value, otherwise return 0.0. --- 808,812 ---- } ! /** * Look for a matching charset within the given array of accept_recs. If we * find a match, return the corresponding q value, otherwise return 0.0. *************** *** 924,928 **** } ! /* * Implements the best match algorithm for a given Accept header, possible * content-type headers and an optional default content-type in the event of --- 963,967 ---- } ! /** * Implements the best match algorithm for a given Accept header, possible * content-type headers and an optional default content-type in the event of *************** *** 1016,1020 **** } ! /* * For HTTP 1.1 responses, where the content has been modified based on HTTP * request headers, need to set the Vary header to name the headers that the --- 1055,1059 ---- } ! /** * For HTTP 1.1 responses, where the content has been modified based on HTTP * request headers, need to set the Vary header to name the headers that the *************** *** 1045,1049 **** } ! /* * The actual content-negotiation phase of this module goes here. * --- 1084,1088 ---- } ! /** * The actual content-negotiation phase of this module goes here. * *************** *** 1176,1180 **** * Similarly to mod_negotiate, we make it configurable. */ ! if( xns->cache_negotiated != CACHE_ON ) { r->no_cache = 1; } --- 1215,1219 ---- * Similarly to mod_negotiate, we make it configurable. */ ! if( xns->cache != caching_on ) { r->no_cache = 1; } *************** *** 1189,1193 **** /* All Apache configuration file code goes here... */ ! /* * Is this module active for the given directory. */ --- 1228,1232 ---- /* All Apache configuration file code goes here... */ ! /** * Is this module active for the given directory. */ *************** *** 1202,1213 **** */ if ( arg ) { ! dir_config->active = ACTIVE_ON; } else { ! dir_config->active = ACTIVE_OFF; } return NULL; } ! /* * Set whether HTTP 1.0 caching should be allowed. Default to "no" unless * specifically overridden. --- 1241,1252 ---- */ if ( arg ) { ! dir_config->active = active_on; } else { ! dir_config->active = active_off; } return NULL; } ! /** * Set whether HTTP 1.0 caching should be allowed. Default to "no" unless * specifically overridden. *************** *** 1223,1233 **** if( arg ) { ! xns->cache_negotiated = CACHE_ON; } else { ! xns->cache_negotiated = CACHE_OFF; } } ! /* * Add content types for the given file extension. */ --- 1262,1272 ---- if( arg ) { ! xns->cache = caching_on; } else { ! xns->cache = caching_off; } } ! /** * Add content types for the given file extension. */ *************** *** 1264,1268 **** } ! /* * Note the minimun number of stars in an Accept token that should be * ignored when performing negotiation. --- 1303,1307 ---- } ! /** * Note the minimun number of stars in an Accept token that should be * ignored when performing negotiation. *************** *** 1288,1292 **** } ! /* * Set the log file name for this module. */ --- 1327,1331 ---- } ! /** * Set the log file name for this module. */ *************** *** 1306,1310 **** } ! /* * Create a default XHTML negotiation module configuration record. */ --- 1345,1349 ---- } ! /** * Create a default XHTML negotiation module configuration record. */ *************** *** 1317,1326 **** xns->fname = NULL; xns->log_fd = NULL; ! xns->cache_negotiated = CACHE_DONTCARE; return (void *)xns; } ! /* * Create a default directory configuration module. */ --- 1356,1365 ---- xns->fname = NULL; xns->log_fd = NULL; ! xns->cache = caching_dontcare; return (void *)xns; } ! /** * Create a default directory configuration module. */ *************** *** 1331,1335 **** xhtml_dir_config *new = (xhtml_dir_config *) apr_pcalloc(p, sizeof(xhtml_dir_config)); ! new->active = ACTIVE_DONTCARE; new->extensions = apr_array_make(p, 5, sizeof(extension_rec)); new->stars_ignore = -1; --- 1370,1374 ---- xhtml_dir_config *new = (xhtml_dir_config *) apr_pcalloc(p, sizeof(xhtml_dir_config)); ! new->active = active_dontcare; new->extensions = apr_array_make(p, 5, sizeof(extension_rec)); new->stars_ignore = -1; *************** *** 1338,1342 **** } ! /* * Merge configuration info from different directories. */ --- 1377,1381 ---- } ! /** * Merge configuration info from different directories. */ *************** *** 1352,1356 **** int i; ! if (add->active == ACTIVE_DONTCARE) { new->active = base->active; } else { --- 1391,1395 ---- int i; ! if (add->active == active_dontcare) { new->active = base->active; } else { *************** *** 1381,1385 **** } ! /* * Initialize the log file, if one is specified. */ --- 1420,1424 ---- } ! /** * Initialize the log file, if one is specified. */ *************** *** 1417,1421 **** } ! /* Apache module declaration. */ static void xhtml_register_hooks(apr_pool_t *p) --- 1456,1460 ---- } ! /** Register specific hooks during request processing. */ static void xhtml_register_hooks(apr_pool_t *p) *************** *** 1425,1428 **** --- 1464,1469 ---- } + /** Record for registering commands with the Apache 2.0.x server. */ + command_rec config_xhtml_cmds[] = { AP_INIT_FLAG("XhtmlNegActive", set_xhtml_active, NULL, OR_INDEXES, *************** *** 1442,1454 **** }; module AP_MODULE_DECLARE_DATA xhtml_neg_module = { STANDARD20_MODULE_STUFF, ! create_xhtml_dir_config, /* dir config creater */ ! merge_xhtml_dir_configs, /* dir config merger */ ! make_xhtml_neg_state, /* server config */ ! NULL, /* merge server configs */ ! config_xhtml_cmds, /* command table */ ! xhtml_register_hooks, /* set up other request processing hooks */ }; --- 1483,1497 ---- }; + /** Module declaration for registering hooks into the Apache 2.0.x server. */ + module AP_MODULE_DECLARE_DATA xhtml_neg_module = { STANDARD20_MODULE_STUFF, ! create_xhtml_dir_config, /**< dir config creater */ ! merge_xhtml_dir_configs, /**< dir config merger */ ! make_xhtml_neg_state, /**< server config */ ! NULL, /**< merge server configs */ ! config_xhtml_cmds, /**< command table */ ! xhtml_register_hooks, /**< set up other request processing hooks */ }; |
From: <ru...@us...> - 2004-03-24 09:36:30
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9180 Modified Files: mod_xhtml_neg.c Log Message: Added Doxygen compliant comments to the source code. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/mod_xhtml_neg.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** mod_xhtml_neg.c 13 Mar 2004 01:35:26 -0000 1.20 --- mod_xhtml_neg.c 24 Mar 2004 09:25:54 -0000 1.21 *************** *** 104,108 **** --- 104,111 ---- #include "http_log.h" + /** Read/write flags used when opening the log file. */ static int xfer_flags = (O_WRONLY | O_APPEND | O_CREAT); + + /** Permission flags used when opening the log file. */ #if defined(OS2) || defined(WIN32) || defined(NETWARE) /* OS/2 dosen't support users and groups */ *************** *** 113,157 **** /* #define MOD_XHTML_NEG_DEBUG 1 */ #define DEFAULT_CHARSET_NAME "iso-8859-1" #define DEFAULT_TEXT_XML_CHARSET "us-ascii" ! #define ACTIVE_ON 1 ! #define ACTIVE_OFF 0 ! #define ACTIVE_DONTCARE 2 - #define CACHE_ON 1 - #define CACHE_OFF 0 - #define CACHE_DONTCARE 2 module MODULE_VAR_EXPORT xhtml_neg_module; typedef struct { ! char *fname; /* Name of the log file we write to, if any */ ! int log_fd; /* File descriptor of the log file, or -1 */ ! int cache_negotiated; /* Flag to caching negotiated content in HTTP 1.0 */ } xhtml_neg_state; typedef struct { ! int active; /* Is the module active for this directory? */ ! array_header *extensions; /* An array of extension_rec records */ ! int stars_ignore; /* How many content-type stars before ! we ignore */ } xhtml_dir_config; ! /* ! * Record of available info on a media type specified by the client ! * (we also use 'em for encodings and languages) */ typedef struct { ! char *name; /* MUST be lowercase */ ! float q_value; /* Quality value, from 0 to 1. */ ! char *charset; /* for content-type only */ ! char *profile; /* The XHTML profile, as per RFC 3236 */ ! int stars; /* How many stars in this accept name? */ ! char *hashcode; } accept_rec; ! /* * Record the maps a file extension to zero or more content-types. The content * types themselves are stored as an array of accept_rec records. --- 116,197 ---- /* #define MOD_XHTML_NEG_DEBUG 1 */ + + /** The default HTTP character set for most content types. */ #define DEFAULT_CHARSET_NAME "iso-8859-1" + /** The default HTTP character set for text/xml and text/xml-external-entity + * content types. */ #define DEFAULT_TEXT_XML_CHARSET "us-ascii" ! /** ! * Enumeration for determining whether processing should be enabled for ! * this module. By default, we set the directory config state to ! * active_dontcare, meaning the value hasn't been explicitly set. When ! * it is set by XhtmlNegActive, the directory config will be set to either ! * active_on or active_off. ! */ ! typedef enum { ! active_on = 1, /**< processing should be active */ ! active_off = 0, /**< processing should not be active */ ! active_dontcare = 2 /**< default processing state (not active) */ ! } xhtml_neg_active; ! ! /** ! * Enumeration for determining whether HTTP 1.0 caching should be allowed ! * for negotiated documents. By default, we set the server config state to ! * caching_dontcare, meaning the value hasn't been explicitly set. When it ! * set by the XhtmlNegCache parameter, the server config will be set to ! * either caching_on or caching_off. ! */ ! typedef enum { ! caching_on = 1, /**< HTTP 1.0 caching should be active */ ! caching_off = 0, /**< HTTP 1.0 caching should not be active */ ! caching_dontcare = 2 /**< default processing state (not active) */ ! } http_caching; module MODULE_VAR_EXPORT xhtml_neg_module; + /** + * A per-server configuration state for this module. Here we record any + * log file that we want to write to, the open file descriptor, and the + * caching state for HTTP 1.0 requests. + */ + typedef struct { ! char *fname; /**< Name of the log file we write to, if any */ ! int log_fd; /**< File descriptor of the log file, or -1 */ ! http_caching cache; /**< Flag to caching negotiated content ! * in HTTP 1.0 */ } xhtml_neg_state; + /** + * A per-directory configuration state for this module. Here we record the + * file extension to content-type mappings, whether the module should be + * active for this directory, and the types of wildcard Accept headers that + * we should ignore. + */ + typedef struct { ! xhtml_neg_active active; /**< Is the module active for this directory? */ ! array_header *extensions; /**< An array of extension_rec records */ ! int stars_ignore; /**< How many content-type stars before ! * we ignore */ } xhtml_dir_config; ! /** ! * Record of available info on a media type specified by the client. ! * We also use them for encodings and profiles). */ typedef struct { ! char *name; /**< MUST be lowercase */ ! float q_value; /**< Quality value, from 0 to 1. */ ! char *charset; /**< for content-type only */ ! char *profile; /**< The XHTML profile, as per RFC 3236 */ ! int stars; /**< How many stars in this accept name? */ ! char *hashcode; /**< The hashcode to be appended to Etags */ } accept_rec; ! /** * Record the maps a file extension to zero or more content-types. The content * types themselves are stored as an array of accept_rec records. *************** *** 159,164 **** typedef struct { ! char *extension; /* Filename extension */ ! array_header *content_types; /* Array of content accept headers */ } extension_rec; --- 199,204 ---- typedef struct { ! char *extension; /**< Filename extension */ ! array_header *content_types; /**< Array of content accept headers */ } extension_rec; *************** *** 170,178 **** */ ! /* * Test whether a string is empty without having to do a full scan of the * string just to return a length, as per strlen. * ! * Todo: could macro-ise this function. */ --- 210,218 ---- */ ! /** * Test whether a string is empty without having to do a full scan of the * string just to return a length, as per strlen. * ! * @todo could macro-ise this function. */ *************** *** 181,185 **** } ! /* * Re-implement strlen, since relying on it being included somewhere along * the way appears to be unsafe. --- 221,225 ---- } ! /** * Re-implement strlen, since relying on it being included somewhere along * the way appears to be unsafe. *************** *** 200,204 **** } ! /* * Compare one string against another in a case-sensitive manner. */ --- 240,244 ---- } ! /** * Compare one string against another in a case-sensitive manner. */ *************** *** 234,238 **** } ! /* * Compare one string against another in a case-insensitive manner. */ --- 274,278 ---- } ! /** * Compare one string against another in a case-insensitive manner. */ *************** *** 277,281 **** } ! /* * Compare strings up to a specified limit in a case-sensitive manner. * If a NULL byte is encountered, finish comparing at that character. --- 317,321 ---- } ! /** * Compare strings up to a specified limit in a case-sensitive manner. * If a NULL byte is encountered, finish comparing at that character. *************** *** 314,318 **** } ! /* * Compare strings up to a specified limit in a case-insensitive manner. * If a NULL byte is encountered, finish comparing at that character. --- 354,358 ---- } ! /** * Compare strings up to a specified limit in a case-insensitive manner. * If a NULL byte is encountered, finish comparing at that character. *************** *** 361,365 **** } ! /* * Determines if the given string end with the given suffix. Case matching * can be enabled or disabled. --- 401,405 ---- } ! /** * Determines if the given string end with the given suffix. Case matching * can be enabled or disabled. *************** *** 399,403 **** } ! /* * Given an array of extension_rec records, find one with the given file * extension. If a match is found, return the extension_rec, otherwise --- 439,443 ---- } ! /** * Given an array of extension_rec records, find one with the given file * extension. If a match is found, return the extension_rec, otherwise *************** *** 429,433 **** } ! /* * Count the number of stars in an Accept content header. This helps determine * priority in case of a tie in q-value priorities. --- 469,473 ---- } ! /** * Count the number of stars in an Accept content header. This helps determine * priority in case of a tie in q-value priorities. *************** *** 451,455 **** } ! /* * Reconstruct the original content-type, if required due to special "charset" * values. Normally the content-type will be a plain string without charset --- 491,495 ---- } ! /** * Reconstruct the original content-type, if required due to special "charset" * values. Normally the content-type will be a plain string without charset *************** *** 458,462 **** * content-type string. * ! * Todo: should we send the "profile" parameter as well? */ --- 498,502 ---- * content-type string. * ! * @todo should we send the "profile" parameter as well? */ *************** *** 478,482 **** } ! /* * Make a simple hash code for the given accept_rec structure. This allows * us to generate unique Etags for accepted content-types. The Etag --- 518,522 ---- } ! /** * Make a simple hash code for the given accept_rec structure. This allows * us to generate unique Etags for accepted content-types. The Etag *************** *** 488,493 **** * concatenated as one long string. * ! * Todo: ! * If the content-type returned ever includes the "profile" parameter, * include it as part of the hash code. */ --- 528,532 ---- * concatenated as one long string. * ! * @todo If the content-type returned ever includes the "profile" parameter, * include it as part of the hash code. */ *************** *** 514,518 **** } ! /* * Merge vlist_validators from different modules. This code is adapted * from code in http_protocol.c in the Apache 1.3 core. --- 553,557 ---- } ! /** * Merge vlist_validators from different modules. This code is adapted * from code in http_protocol.c in the Apache 1.3 core. *************** *** 564,568 **** ! /* * For a given filename, scan through an array of extension_rec records * until we find a match. The first match wins. If no match is found, --- 603,607 ---- ! /** * For a given filename, scan through an array of extension_rec records * until we find a match. The first match wins. If no match is found, *************** *** 586,594 **** } ! /* ! * Following code modified from mod_negotiate.c ! * * Get a single mime type entry --- one media type and parameters; ! * enter the values we recognize into the argument accept_rec */ --- 625,633 ---- } ! /* Following code modified from mod_negotiate.c */ ! ! /** * Get a single mime type entry --- one media type and parameters; ! * enter the values we recognize into the argument accept_rec. */ *************** *** 678,683 **** } ! /* ! * Dealing with Accept header lines ... * * The Accept request header is handled by do_accept_line() - it has the --- 717,722 ---- } ! /** ! * Deal with Accept header lines. * * The Accept request header is handled by do_accept_line() - it has the *************** *** 712,716 **** } ! /* * Deal explicitly with Accept-Charset headers. There is an extra record * inserted when neither "*" nor "ISO-8859-1" are mentioned. --- 751,755 ---- } ! /** * Deal explicitly with Accept-Charset headers. There is an extra record * inserted when neither "*" nor "ISO-8859-1" are mentioned. *************** *** 765,769 **** } ! /* * Look for a matching charset within the given array of accept_recs. If we * find a match, return the corresponding q value, otherwise return 0.0. --- 804,808 ---- } ! /** * Look for a matching charset within the given array of accept_recs. If we * find a match, return the corresponding q value, otherwise return 0.0. *************** *** 920,924 **** } ! /* * Implements the best match algorithm for a given Accept header, possible * content-type headers and an optional default content-type in the event of --- 959,963 ---- } ! /** * Implements the best match algorithm for a given Accept header, possible * content-type headers and an optional default content-type in the event of *************** *** 1010,1014 **** } ! /* * For HTTP 1.1 responses, where the content has been modified based on HTTP * request headers, need to set the Vary header to name the headers that the --- 1049,1053 ---- } ! /** * For HTTP 1.1 responses, where the content has been modified based on HTTP * request headers, need to set the Vary header to name the headers that the *************** *** 1039,1044 **** } ! /* ! * The actual content-negotiation phase of this module goes here... */ --- 1078,1083 ---- } ! /** ! * The actual content-negotiation phase of this module goes here. */ *************** *** 1066,1070 **** /* Return OK if either active isn't ON, or stars_ignore is 0. */ ! if( conf->active != ACTIVE_ON ) { return OK; } --- 1105,1109 ---- /* Return OK if either active isn't ON, or stars_ignore is 0. */ ! if( conf->active != active_on ) { return OK; } *************** *** 1175,1179 **** * Similarly to mod_negotiate, we make it configurable. */ ! if( xns->cache_negotiated != CACHE_ON ) { r->no_cache = 1; } --- 1214,1218 ---- * Similarly to mod_negotiate, we make it configurable. */ ! if( xns->cache != caching_on ) { r->no_cache = 1; } *************** *** 1188,1192 **** /* All Apache configuration file code goes here... */ ! /* * Is this module active for the given directory. */ --- 1227,1231 ---- /* All Apache configuration file code goes here... */ ! /** * Is this module active for the given directory. */ *************** *** 1199,1210 **** */ if ( arg ) { ! dir_config->active = ACTIVE_ON; } else { ! dir_config->active = ACTIVE_OFF; } return NULL; } ! /* * Set whether HTTP 1.0 caching should be allowed. Default to "no" unless * specifically overridden. --- 1238,1249 ---- */ if ( arg ) { ! dir_config->active = active_on; } else { ! dir_config->active = active_off; } return NULL; } ! /** * Set whether HTTP 1.0 caching should be allowed. Default to "no" unless * specifically overridden. *************** *** 1220,1230 **** if( arg ) { ! xns->cache_negotiated = CACHE_ON; } else { ! xns->cache_negotiated = CACHE_OFF; } } ! /* * Add content types for the given file extension. */ --- 1259,1269 ---- if( arg ) { ! xns->cache = caching_on; } else { ! xns->cache = caching_off; } } ! /** * Add content types for the given file extension. */ *************** *** 1259,1263 **** } ! /* * Note the minimun number of stars in an Accept token that should be * ignored when performing negotiation. --- 1298,1302 ---- } ! /** * Note the minimun number of stars in an Accept token that should be * ignored when performing negotiation. *************** *** 1282,1286 **** } ! /* * Set the log file name for this module. */ --- 1321,1325 ---- } ! /** * Set the log file name for this module. */ *************** *** 1299,1303 **** } ! /* * Create a default XHTML negotiation module configuration record. */ --- 1338,1342 ---- } ! /** * Create a default XHTML negotiation module configuration record. */ *************** *** 1310,1319 **** xns->fname = NULL; xns->log_fd = -1; ! xns->cache_negotiated = CACHE_DONTCARE; return (void *)xns; } ! /* * Create a default directory configuration module. */ --- 1349,1358 ---- xns->fname = NULL; xns->log_fd = -1; ! xns->cache = caching_dontcare; return (void *)xns; } ! /** * Create a default directory configuration module. */ *************** *** 1323,1327 **** xhtml_dir_config *new = (xhtml_dir_config *) ap_pcalloc(p, sizeof(xhtml_dir_config)); ! new->active = ACTIVE_DONTCARE; new->extensions = ap_make_array(p, 5, sizeof(extension_rec)); new->stars_ignore = -1; --- 1362,1366 ---- xhtml_dir_config *new = (xhtml_dir_config *) ap_pcalloc(p, sizeof(xhtml_dir_config)); ! new->active = active_dontcare; new->extensions = ap_make_array(p, 5, sizeof(extension_rec)); new->stars_ignore = -1; *************** *** 1330,1334 **** } ! /* * Merge configuration info from different directories. */ --- 1369,1373 ---- } ! /** * Merge configuration info from different directories. */ *************** *** 1344,1348 **** int i; ! if (add->active == ACTIVE_DONTCARE) { new->active = base->active; } else { --- 1383,1387 ---- int i; ! if (add->active == active_dontcare) { new->active = base->active; } else { *************** *** 1373,1377 **** } ! /* * Initialize the log file, if one is specified. */ --- 1412,1416 ---- } ! /** * Initialize the log file, if one is specified. */ *************** *** 1404,1408 **** } ! /* Apache module declaration. */ command_rec config_xhtml_cmds[] = { --- 1443,1447 ---- } ! /** Record for registering commands with the Apache 1.3.x server. */ command_rec config_xhtml_cmds[] = { *************** *** 1422,1446 **** }; module MODULE_VAR_EXPORT xhtml_neg_module = { STANDARD_MODULE_STUFF, ! init_xhtml_log, /* initializer */ ! create_xhtml_dir_config, /* dir config creater */ ! merge_xhtml_dir_configs, /* dir config merger */ ! make_xhtml_neg_state, /* server config */ ! NULL, /* merge server configs */ ! config_xhtml_cmds, /* command table */ ! NULL, /* handlers */ ! NULL, /* filename translation */ ! NULL, /* check_user_id */ ! NULL, /* check auth */ ! NULL, /* check access */ ! NULL, /* type_checker */ ! xhtml_negotiate, /* fixups */ ! NULL, /* logger */ ! NULL, /* header parser */ ! NULL, /* child_init */ ! NULL, /* child_exit */ ! NULL /* post read-request */ }; --- 1461,1487 ---- }; + /** Module declaration for registering hooks into the Apache 1.3.x server. */ + module MODULE_VAR_EXPORT xhtml_neg_module = { STANDARD_MODULE_STUFF, ! init_xhtml_log, /**< initializer */ ! create_xhtml_dir_config, /**< dir config creater */ ! merge_xhtml_dir_configs, /**< dir config merger */ ! make_xhtml_neg_state, /**< server config */ ! NULL, /**< merge server configs */ ! config_xhtml_cmds, /**< command table */ ! NULL, /**< handlers */ ! NULL, /**< filename translation */ ! NULL, /**< check_user_id */ ! NULL, /**< check auth */ ! NULL, /**< check access */ ! NULL, /**< type_checker */ ! xhtml_negotiate, /**< fixups */ ! NULL, /**< logger */ ! NULL, /**< header parser */ ! NULL, /**< child_init */ ! NULL, /**< child_exit */ ! NULL /**< post read-request */ }; |
From: <ru...@us...> - 2004-03-15 04:51:35
|
Update of /cvsroot/mod-xhtml-neg/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9423 Modified Files: cvsignore Log Message: Another suffix for Apache 2.0 module compilation. Index: cvsignore =================================================================== RCS file: /cvsroot/mod-xhtml-neg/CVSROOT/cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cvsignore 15 Mar 2004 04:41:28 -0000 1.2 --- cvsignore 15 Mar 2004 04:42:31 -0000 1.3 *************** *** 1,4 **** --- 1,5 ---- *.o *.la + *.lai *.lo *.slo |
From: <ru...@us...> - 2004-03-15 04:50:33
|
Update of /cvsroot/mod-xhtml-neg/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9319 Modified Files: cvsignore Log Message: Added more suffixes to cvsignore (for Apache 2.0 compilation). Index: cvsignore =================================================================== RCS file: /cvsroot/mod-xhtml-neg/CVSROOT/cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cvsignore 4 Mar 2004 08:57:42 -0000 1.1 --- cvsignore 15 Mar 2004 04:41:28 -0000 1.2 *************** *** 1,3 **** --- 1,6 ---- *.o + *.la + *.lo + *.slo *.so *.bak |
From: <ru...@us...> - 2004-03-15 04:42:24
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7772 Modified Files: README Log Message: Added note in the README about the version of Apache supported. Index: README =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README 4 Mar 2004 09:30:13 -0000 1.1 --- README 15 Mar 2004 04:33:20 -0000 1.2 *************** *** 7,10 **** --- 7,13 ---- specification. + This is the release for Apache 1.3.x. For the Apache 2.0.x server, + please download the 2.0 compatible package. + This allows compatible browsers to view XHTML content as XML-compliant documents, and older or less compatible clients to view XHTML content |
From: <ru...@us...> - 2004-03-15 04:41:59
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7677 Modified Files: README Log Message: Added note in the README about the version of Apache supported. Index: README =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** README 13 Mar 2004 07:07:50 -0000 1.1.1.1 --- README 15 Mar 2004 04:32:56 -0000 1.2 *************** *** 7,10 **** --- 7,13 ---- specification. + This is the release for Apache 2.0.x. For the Apache 1.3.x server, + please download the 1.3 compatible package. + This allows compatible browsers to view XHTML content as XML-compliant documents, and older or less compatible clients to view XHTML content |
From: <ru...@us...> - 2004-03-15 04:38:21
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7086 Modified Files: mod_xhtml_neg.c Log Message: Fixed compilation warning and don't both explicitly calling ap_set_etag any more. The default handler will do that for us. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0/mod_xhtml_neg.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mod_xhtml_neg.c 15 Mar 2004 03:09:23 -0000 1.4 --- mod_xhtml_neg.c 15 Mar 2004 04:29:17 -0000 1.5 *************** *** 522,527 **** */ ! static const char *merge_validators(apr_pool_t *p, const char *old_variant, ! const char *new_variant) { int old_weak, new_weak; --- 522,527 ---- */ ! static char *merge_validators(apr_pool_t *p, char *old_variant, ! char *new_variant) { int old_weak, new_weak; *************** *** 1150,1163 **** * by Apache. */ - char *etag = merge_validators( r->pool, r->vlist_validator, - result_rec->hashcode ); r->content_type = reconstruct_content_type( r->pool, result_rec ); ! r->vlist_validator = etag; ! ap_set_etag(r); if( xns->log_fd != NULL ) { logmessage = apr_pstrcat(r->pool, "Best content-type: ", r->content_type, "\n", ! "New validator is: ", etag, "\n", NULL ); logsize = mod_xhtml_strlen( logmessage ); --- 1150,1161 ---- * by Apache. */ r->content_type = reconstruct_content_type( r->pool, result_rec ); ! r->vlist_validator = merge_validators( r->pool, r->vlist_validator, ! result_rec->hashcode ); if( xns->log_fd != NULL ) { logmessage = apr_pstrcat(r->pool, "Best content-type: ", r->content_type, "\n", ! "New validator is: ", r->vlist_validator, "\n", NULL ); logsize = mod_xhtml_strlen( logmessage ); |
From: <ru...@us...> - 2004-03-15 03:18:25
|
Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26891 Modified Files: mod_xhtml_neg.c Log Message: Hook into the handler now, to make sure we always send the correct result for 200 and 304 HTTP codes. Index: mod_xhtml_neg.c =================================================================== RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg-2.0/mod_xhtml_neg.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mod_xhtml_neg.c 13 Mar 2004 09:27:13 -0000 1.3 --- mod_xhtml_neg.c 15 Mar 2004 03:09:23 -0000 1.4 *************** *** 573,578 **** */ ! static extension_rec *get_extension_for_filename( apr_array_header_t *extensions, ! const char *filename ) { extension_rec *list, *item; --- 573,578 ---- */ ! static extension_rec *get_extension_for_filename( ! apr_array_header_t *extensions, const char *filename ) { extension_rec *list, *item; *************** *** 697,701 **** */ ! static apr_array_header_t *do_accept_line(apr_pool_t *p, const char *accept_line) { apr_array_header_t *accept_recs; --- 697,702 ---- */ ! static apr_array_header_t *do_accept_line(apr_pool_t *p, ! const char *accept_line) { apr_array_header_t *accept_recs; *************** *** 930,934 **** static accept_rec *best_match(apr_array_header_t *accept_type, ! apr_array_header_t *content_type, apr_array_header_t *accept_charset, int stars_to_match, xhtml_neg_state *xns) { --- 931,936 ---- static accept_rec *best_match(apr_array_header_t *accept_type, ! apr_array_header_t *content_type, ! apr_array_header_t *accept_charset, int stars_to_match, xhtml_neg_state *xns) { *************** *** 1044,1053 **** /* ! * The actual content-negotiation phase of this module goes here... */ int xhtml_negotiate(request_rec *r) { ! apr_array_header_t *extensions, *accept_types, *accept_charsets, *content_types; const char *content_accept, *accept_charset; char *filename, *extension, *logmessage; --- 1046,1061 ---- /* ! * The actual content-negotiation phase of this module goes here. ! * ! * Note that due to the way we hook into the Apache handler system means ! * we always return DECLINED, even though handling was a success. ! * We do this so that the default handler will always run, and so that ! * ETag is handled correctly for both 200 OK and 304 Not Modified cases. */ int xhtml_negotiate(request_rec *r) { ! apr_array_header_t *extensions, *accept_types, ! *accept_charsets, *content_types; const char *content_accept, *accept_charset; char *filename, *extension, *logmessage; *************** *** 1072,1076 **** /* Only service requests for GET or HEAD methods. */ if( r->method_number != M_GET ) { ! return OK; } --- 1080,1084 ---- /* Only service requests for GET or HEAD methods. */ if( r->method_number != M_GET ) { ! return DECLINED; } *************** *** 1078,1082 **** hdrs = r->headers_in; if( hdrs == NULL ) { ! return OK; } --- 1086,1090 ---- hdrs = r->headers_in; if( hdrs == NULL ) { ! return DECLINED; } *************** *** 1084,1088 **** filename = r->filename; if( mod_xhtml_strempty( filename )) { ! return OK; } --- 1092,1096 ---- filename = r->filename; if( mod_xhtml_strempty( filename )) { ! return DECLINED; } *************** *** 1098,1102 **** content_types = item->content_types; } else { ! return OK; } --- 1106,1110 ---- content_types = item->content_types; } else { ! return DECLINED; } *************** *** 1142,1150 **** * by Apache. */ ! const char *old_etag = apr_table_get( r->headers_out, "Etag" ); ! const char *etag = merge_validators( r->pool, old_etag, result_rec->hashcode ); - apr_table_setn(r->headers_out, "Etag", etag ); r->content_type = reconstruct_content_type( r->pool, result_rec ); if( xns->log_fd != NULL ) { --- 1150,1158 ---- * by Apache. */ ! char *etag = merge_validators( r->pool, r->vlist_validator, result_rec->hashcode ); r->content_type = reconstruct_content_type( r->pool, result_rec ); + r->vlist_validator = etag; + ap_set_etag(r); if( xns->log_fd != NULL ) { *************** *** 1177,1220 **** } ! return OK; ! } ! ! /* Filter code goes here */ ! static void xhtml_neg_insert_output_filter(request_rec *r) ! { ! xhtml_dir_config *conf = ap_get_module_config(r->per_dir_config, ! &xhtml_neg_module); ! ! if ((conf->active == ACTIVE_ON) && (conf->stars_ignore > 0)) { ! ap_add_output_filter("XHTML_NEGOTIATION_OUT", NULL, r, r->connection); ! } ! } ! ! /* ! * This is the output filter identified by the name "XHTML_NEGOTIATION_OUT" ! */ ! ! static apr_status_t xhtml_negotiation_output_filter(ap_filter_t *f, ! apr_bucket_brigade *in) ! { ! xhtml_dir_config *conf = ap_get_module_config(f->r->per_dir_config, ! &xhtml_neg_module); ! ! ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, f->r->server, ! "mod_xhtml_neg: xhtml_negotiation_output_filter()"); ! ! /* do the fixup */ ! xhtml_negotiate(f->r); ! ! /* remove ourselves from the filter chain */ ! ap_remove_output_filter(f); ! ! /* send the data up the stack */ ! return ap_pass_brigade(f->next,in); } - - /* All Apache configuration file code goes here... */ --- 1185,1192 ---- } ! return DECLINED; } /* All Apache configuration file code goes here... */ *************** *** 1322,1326 **** */ ! static const char *add_xhtml_log(cmd_parms *cmd, void *dummy, const char *logfile) { xhtml_neg_state *xns; --- 1294,1299 ---- */ ! static const char *add_xhtml_log(cmd_parms *cmd, void *dummy, ! const char *logfile) { xhtml_neg_state *xns; *************** *** 1435,1439 **** fd = NULL; ! if( apr_file_open(&fd, fname, xfer_flags, xfer_perms, pconf) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "could not open log file %s.", fname); --- 1408,1413 ---- fd = NULL; ! if( apr_file_open(&fd, fname, xfer_flags, xfer_perms, pconf) ! != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "could not open log file %s.", fname); *************** *** 1450,1457 **** { ap_hook_post_config(init_xhtml_log, NULL, NULL, APR_HOOK_MIDDLE); ! ap_hook_insert_filter(xhtml_neg_insert_output_filter, NULL, NULL, APR_HOOK_LAST); ! ap_register_output_filter("XHTML_NEGOTIATION_OUT", ! xhtml_negotiation_output_filter, ! NULL, AP_FTYPE_CONTENT_SET); } --- 1424,1428 ---- { ap_hook_post_config(init_xhtml_log, NULL, NULL, APR_HOOK_MIDDLE); ! ap_hook_handler(xhtml_negotiate, NULL, NULL, APR_HOOK_FIRST); } |