Annotation of libwww/Library/src/HTInit.c, revision 2.99
2.20 frystyk 1: /* HTInit.c
2: ** CONFIGURATION-SPECIFIC INITIALIALIZATION
3: **
2.25 frystyk 4: ** (c) COPYRIGHT MIT 1995.
2.20 frystyk 5: ** Please first read the full copyright statement in the file COPYRIGH.
2.99 ! frystyk 6: ** @(#) $Id: HTInit.c,v 2.98 1999/04/04 00:14:38 frystyk Exp $
2.9 duns 7: **
2.97 frystyk 8: ** General initialization functions.
9: **
10: ** @@@A lot of these should be moved to the various modules instead
11: ** of being here
2.1 timbl 12: */
13:
2.22 frystyk 14: /* Library include files */
2.89 frystyk 15: #include "wwwsys.h"
2.59 frystyk 16: #include "WWWUtil.h"
17: #include "WWWCore.h"
2.83 frystyk 18:
19: #ifdef HT_MUX
2.75 frystyk 20: #include "WWWMux.h"
2.83 frystyk 21: #endif
2.75 frystyk 22:
2.22 frystyk 23: #include "HTInit.h" /* Implemented here */
2.1 timbl 24:
2.65 frystyk 25: #ifndef W3C_ICONS
2.87 frystyk 26: #define W3C_ICONS "w3c-icons"
2.65 frystyk 27: #endif
28:
2.87 frystyk 29: #define ICON_LOCATION "/icons/"
2.65 frystyk 30:
2.29 frystyk 31: /* ------------------------------------------------------------------------- */
32:
2.23 frystyk 33: /* BINDINGS BETWEEN A SOURCE MEDIA TYPE AND A DEST MEDIA TYPE (CONVERSION)
34: ** ----------------------------------------------------------------------
2.47 frystyk 35: ** Not done automaticly - may be done by application!
2.23 frystyk 36: */
2.38 frystyk 37: PUBLIC void HTConverterInit (HTList * c)
2.23 frystyk 38: {
2.31 frystyk 39: /*
2.49 frystyk 40: ** You can get debug information out through the debug stream if you set
41: ** the debug format appropriately
42: */
43: HTConversion_add(c,"*/*", "www/debug", HTBlackHoleConverter, 1.0, 0.0, 0.0);
44:
45: /*
2.95 frystyk 46: ** Set our own local file save stream for the MIME parser so that
47: ** we know how to dump to local disk in case we get content type
48: ** application/octect stream, or an encoding that we don't know.
49: */
50: HTMIME_setSaveStream (HTSaveLocally);
51:
52: /*
2.31 frystyk 53: ** These are converters that converts to something other than www/present,
54: ** that is not directly outputting someting to the user on the screen
55: */
2.43 frystyk 56: HTConversion_add(c,"message/rfc822", "*/*", HTMIMEConvert, 1.0, 0.0, 0.0);
2.55 frystyk 57: HTConversion_add(c,"message/x-rfc822-foot", "*/*", HTMIMEFooter, 1.0, 0.0, 0.0);
2.72 frystyk 58: HTConversion_add(c,"message/x-rfc822-head", "*/*", HTMIMEHeader, 1.0, 0.0, 0.0);
2.80 frystyk 59: HTConversion_add(c,"message/x-rfc822-cont", "*/*", HTMIMEContinue, 1.0, 0.0, 0.0);
2.96 frystyk 60: HTConversion_add(c,"message/x-rfc822-upgrade","*/*", HTMIMEUpgrade, 1.0, 0.0, 0.0);
2.80 frystyk 61: HTConversion_add(c,"message/x-rfc822-partial","*/*", HTMIMEPartial, 1.0, 0.0, 0.0);
2.43 frystyk 62: HTConversion_add(c,"multipart/*", "*/*", HTBoundary, 1.0, 0.0, 0.0);
2.38 frystyk 63: HTConversion_add(c,"text/plain", "text/html", HTPlainToHTML, 1.0, 0.0, 0.0);
2.39 frystyk 64:
65: /*
66: ** The following conversions are converting ASCII output from various
67: ** protocols to HTML objects.
68: */
2.51 frystyk 69: HTConversion_add(c,"text/x-http", "*/*", HTTPStatus_new, 1.0, 0.0, 0.0);
2.68 frystyk 70:
2.42 frystyk 71: #if 0
72: HTConversion_add(c,"text/x-gopher", "www/present", HTGopherMenu, 1.0, 0.0, 0.0);
73: HTConversion_add(c,"text/x-cso", "www/present", HTGopherCSO, 1.0, 0.0, 0.0);
2.68 frystyk 74: HTConversion_add(c,"text/x-wais-source", "*/*", HTWSRCConvert, 1.0, 0.0, 0.0);
75: #endif
76:
2.48 frystyk 77: HTConversion_add(c,"text/x-nntp-list", "*/*", HTNewsList, 1.0, 0.0, 0.0);
78: HTConversion_add(c,"text/x-nntp-over", "*/*", HTNewsGroup, 1.0, 0.0, 0.0);
2.92 frystyk 79:
80: /*
81: ** If we have the XML expat parser linked in
82: */
83: #ifdef HT_EXPAT
84: HTConversion_add(c, "text/xml", "*/*", HTXML_new, 1.0, 0.0, 0.0);
85: HTConversion_add(c, "application/xml", "*/*", HTXML_new, 1.0, 0.0, 0.0);
86: #endif
2.43 frystyk 87:
2.31 frystyk 88: /*
2.45 frystyk 89: ** We also register a special content type guess stream that can figure out
90: ** the content type by reading the first bytes of the stream
91: */
92: HTConversion_add(c,"www/unknown", "*/*", HTGuess_new, 1.0, 0.0, 0.0);
2.46 frystyk 93:
94: /*
2.72 frystyk 95: ** Register a persistent cache stream which can save an object to local
96: ** file
97: */
98: HTConversion_add(c,"www/cache", "*/*", HTCacheWriter, 1.0, 0.0, 0.0);
2.73 frystyk 99: HTConversion_add(c,"www/cache-append", "*/*", HTCacheAppend, 1.0, 0.0, 0.0);
2.72 frystyk 100:
101: /*
2.46 frystyk 102: ** Handling Rule files is handled just like any other stream
103: ** This converter reads a rule file and generates the rules
104: */
2.48 frystyk 105: HTConversion_add(c,"application/x-www-rules","*/*", HTRules, 1.0, 0.0, 0.0);
2.46 frystyk 106:
2.45 frystyk 107: /*
2.34 frystyk 108: ** This dumps all other formats to local disk without any further
2.31 frystyk 109: ** action taken
110: */
2.85 frystyk 111: HTConversion_add(c,"*/*", "www/present", HTSaveConverter, 0.3, 0.0, 0.0);
2.23 frystyk 112: }
113:
114: /* BINDINGS BETWEEN MEDIA TYPES AND EXTERNAL VIEWERS/PRESENTERS
115: ** ------------------------------------------------------------
2.47 frystyk 116: ** Not done automaticly - may be done by application!
2.23 frystyk 117: ** The data objects are stored in temporary files before the external
118: ** program is called
119: */
2.38 frystyk 120: PUBLIC void HTPresenterInit (HTList * c)
2.1 timbl 121: {
2.95 frystyk 122: /*
123: ** First we set the special "presenter" stream that writes to a
124: ** temporary file before executing the external presenter
125: */
126: HTPresentation_setConverter(HTSaveAndExecute);
127:
2.1 timbl 128: #ifdef NeXT
2.38 frystyk 129: HTPresentation_add(c,"application/postscript", "open %s", NULL, 1.0, 2.0, 0.0);
2.10 luotonen 130: /* The following needs the GIF previewer -- you might not have it. */
2.19 howcome 131:
2.38 frystyk 132: HTPresentation_add(c,"image/gif", "open %s", NULL, 0.3, 2.0, 0.0);
2.44 frystyk 133: HTPresentation_add(c,"image/tiff", "open %s", NULL, 1.0, 2.0, 0.0);
2.41 frystyk 134: HTPresentation_add(c,"audio/basic", "open %s", NULL, 1.0, 2.0, 0.0);
135: HTPresentation_add(c,"*/*", "open %s", NULL, 0.05, 0.0, 0.0);
2.1 timbl 136: #else
2.10 luotonen 137: if (getenv("DISPLAY")) { /* Must have X11 */
2.38 frystyk 138: HTPresentation_add(c,"application/postscript", "ghostview %s", NULL, 1.0, 3.0, 0.0);
2.41 frystyk 139: HTPresentation_add(c,"image/gif", "xv %s", NULL, 1.0, 3.0, 0.0);
2.44 frystyk 140: HTPresentation_add(c,"image/tiff", "xv %s", NULL, 1.0, 3.0, 0.0);
2.38 frystyk 141: HTPresentation_add(c,"image/jpeg", "xv %s", NULL, 1.0, 3.0, 0.0);
2.44 frystyk 142: HTPresentation_add(c,"image/png", "xv %s", NULL, 1.0, 3.0, 0.0);
2.10 luotonen 143: }
2.1 timbl 144: #endif
2.15 frystyk 145: }
146:
147:
2.23 frystyk 148: /* PRESENTERS AND CONVERTERS AT THE SAME TIME
149: ** ------------------------------------------
2.47 frystyk 150: ** Not done automaticly - may be done by application!
2.23 frystyk 151: ** This function is only defined in order to preserve backward
152: ** compatibility.
153: */
2.38 frystyk 154: PUBLIC void HTFormatInit (HTList * c)
2.15 frystyk 155: {
2.23 frystyk 156: HTConverterInit(c);
157: HTPresenterInit(c);
158:
2.1 timbl 159: }
160:
2.78 frystyk 161: /* BINDINGS BETWEEN A TRANSFER ENCODING AND CODERS / DECODERS
162: ** ----------------------------------------------------------
2.55 frystyk 163: ** Not done automaticly - may be done by application!
164: */
2.78 frystyk 165: PUBLIC void HTTransferEncoderInit (HTList * c)
2.55 frystyk 166: {
2.90 frystyk 167: #ifdef HT_ZLIB
168: HTCoding_add(c, "deflate", NULL, HTZLib_inflate, 1.0);
169: #endif
2.63 frystyk 170: HTCoding_add(c, "chunked", HTChunkedEncoder, HTChunkedDecoder, 1.0);
2.55 frystyk 171: }
2.47 frystyk 172:
2.78 frystyk 173: /* BINDINGS BETWEEN A CONTENT ENCODING AND CODERS / DECODERS
174: ** ---------------------------------------------------------
175: ** Not done automaticly - may be done by application!
176: */
177: PUBLIC void HTContentEncoderInit (HTList * c)
178: {
2.79 frystyk 179: #ifdef HT_ZLIB
2.78 frystyk 180: HTCoding_add(c, "deflate", NULL, HTZLib_inflate, 1.0);
2.79 frystyk 181: #endif /* HT_ZLIB */
2.78 frystyk 182: }
183:
2.64 frystyk 184: /* REGISTER BEFORE FILTERS
185: ** -----------------------
186: ** The BEFORE filters handle proxies, caches, rule files etc.
187: ** The filters are called in the order by which the are registered
188: ** Not done automaticly - may be done by application!
189: */
190: PUBLIC void HTBeforeInit (void)
191: {
2.74 frystyk 192: HTNet_addBefore(HTCredentialsFilter, "http://*", NULL, HT_FILTER_LATE);
193: HTNet_addBefore(HTPEP_beforeFilter, "http://*", NULL, HT_FILTER_LATE);
194: HTNet_addBefore(HTRuleFilter, NULL, NULL, HT_FILTER_LATE);
195: HTNet_addBefore(HTProxyFilter, NULL, NULL, HT_FILTER_LATE);
2.64 frystyk 196: }
197:
198: /* REGISTER AFTER FILTERS
199: ** ----------------------
200: ** The AFTER filters handle error messages, logging, redirection,
201: ** authentication etc.
202: ** The filters are called in the order by which the are registered
203: ** Not done automaticly - may be done by application!
204: */
205: PUBLIC void HTAfterInit (void)
206: {
2.74 frystyk 207: HTNet_addAfter(HTAuthFilter, "http://*", NULL, HT_NO_ACCESS, HT_FILTER_MIDDLE);
2.81 frystyk 208: HTNet_addAfter(HTAuthFilter, "http://*", NULL, HT_REAUTH, HT_FILTER_MIDDLE);
2.74 frystyk 209: HTNet_addAfter(HTPEP_afterFilter, "http://*", NULL, HT_ALL, HT_FILTER_MIDDLE);
2.81 frystyk 210: HTNet_addAfter(HTRedirectFilter, "http://*", NULL, HT_PERM_REDIRECT, HT_FILTER_MIDDLE);
211: HTNet_addAfter(HTRedirectFilter, "http://*", NULL, HT_FOUND, HT_FILTER_MIDDLE);
212: HTNet_addAfter(HTRedirectFilter, "http://*", NULL, HT_SEE_OTHER, HT_FILTER_MIDDLE);
2.74 frystyk 213: HTNet_addAfter(HTRedirectFilter, "http://*", NULL, HT_TEMP_REDIRECT, HT_FILTER_MIDDLE);
2.93 kahan 214: HTNet_addAfter(HTAuthInfoFilter, "http://*", NULL, HT_ALL, HT_FILTER_MIDDLE);
2.74 frystyk 215: HTNet_addAfter(HTUseProxyFilter, "http://*", NULL, HT_USE_PROXY, HT_FILTER_MIDDLE);
216: HTNet_addAfter(HTInfoFilter, NULL, NULL, HT_ALL, HT_FILTER_LATE);
2.64 frystyk 217: }
218:
219: /* REGISTER DEFAULT AUTHENTICATION SCHEMES
220: ** ---------------------------------------
221: ** This function registers the BASIC access authentication
222: */
223: PUBLIC void HTAAInit (void)
224: {
2.93 kahan 225: HTAA_newModule ("basic", HTBasic_generate, HTBasic_parse, NULL,
226: HTBasic_delete);
2.99 ! frystyk 227: #ifdef HT_MD5
2.91 kahan 228: HTAA_newModule ("digest", HTDigest_generate, HTDigest_parse,
2.93 kahan 229: HTDigest_updateInfo, HTDigest_delete);
2.99 ! frystyk 230: #endif /* HT_MD5 */
2.64 frystyk 231: }
232:
233: /* REGISTER BEFORE AND AFTER FILTERS
234: ** ---------------------------------
235: ** We register a commonly used set of BEFORE and AFTER filters.
2.47 frystyk 236: ** Not done automaticly - may be done by application!
237: */
238: PUBLIC void HTNetInit (void)
239: {
2.64 frystyk 240: HTBeforeInit();
241: HTAfterInit();
2.47 frystyk 242: }
243:
244:
245: /* REGISTER CALLBACKS FOR THE ALERT MANAGER
246: ** ----------------------------------------
247: ** We register a set of alert messages
248: ** Not done automaticly - may be done by application!
249: */
250: PUBLIC void HTAlertInit (void)
251: {
252: HTAlert_add(HTProgress, HT_A_PROGRESS);
253: HTAlert_add(HTError_print, HT_A_MESSAGE);
254: HTAlert_add(HTConfirm, HT_A_CONFIRM);
255: HTAlert_add(HTPrompt, HT_A_PROMPT);
256: HTAlert_add(HTPromptPassword, HT_A_SECRET);
257: HTAlert_add(HTPromptUsernameAndPassword, HT_A_USER_PW);
258: }
259:
2.53 frystyk 260: /* REGISTER ALL KNOWN TRANSPORTS IN THE LIBRARY
261: ** --------------------------------------------
262: ** Not done automaticly - may be done by application!
263: */
264: PUBLIC void HTTransportInit (void)
265: {
2.69 frystyk 266: HTTransport_add("tcp", HT_TP_SINGLE, HTReader_new, HTWriter_new);
267: HTTransport_add("buffered_tcp", HT_TP_SINGLE, HTReader_new, HTBufferWriter_new);
2.75 frystyk 268: #ifdef HT_MUX
2.76 frystyk 269: HTTransport_add("mux", HT_TP_INTERLEAVE, HTReader_new, HTBufferWriter_new);
2.75 frystyk 270: #endif /* HT_MUX */
2.54 frystyk 271: #ifndef NO_UNIX_IO
2.69 frystyk 272: HTTransport_add("local", HT_TP_SINGLE, HTReader_new, HTWriter_new);
2.54 frystyk 273: #else
2.69 frystyk 274: HTTransport_add("local", HT_TP_SINGLE, HTANSIReader_new, HTANSIWriter_new);
2.54 frystyk 275: #endif
2.53 frystyk 276: }
2.47 frystyk 277:
2.24 frystyk 278: /* REGISTER ALL KNOWN PROTOCOLS IN THE LIBRARY
279: ** -------------------------------------------
2.47 frystyk 280: ** Not done automaticly - may be done by application!
2.24 frystyk 281: */
2.63 frystyk 282: PUBLIC void HTProtocolInit (void)
2.24 frystyk 283: {
284: #ifndef DECNET
2.75 frystyk 285: HTProtocol_add("ftp", "tcp", FTP_PORT, NO, HTLoadFTP, NULL);
286: HTProtocol_add("nntp", "tcp", NEWS_PORT, NO, HTLoadNews, NULL);
287: HTProtocol_add("news", "tcp", NEWS_PORT, NO, HTLoadNews, NULL);
288: HTProtocol_add("gopher", "tcp", GOPHER_PORT, NO, HTLoadGopher, NULL);
2.24 frystyk 289: #ifdef HT_DIRECT_WAIS
2.88 frystyk 290: HTProtocol_add("wais", "tcp", WAIS_PORT, YES, HTLoadWAIS, NULL);
2.24 frystyk 291: #endif
292: #endif /* DECNET */
2.75 frystyk 293: #ifdef HT_MUX
294: HTProtocol_add("http", "mux", HTTP_PORT, NO, HTLoadHTTP, NULL);
295: #else
296: HTProtocol_add("http", "buffered_tcp", HTTP_PORT, NO, HTLoadHTTP, NULL);
297: #endif /* !HT_MUX */
2.84 frystyk 298: #ifndef NO_UNIX_IO
299: HTProtocol_add("file", "local", 0, NO, HTLoadFile, NULL);
300: HTProtocol_add("cache", "local", 0, NO, HTLoadCache, NULL);
301: #else
302: HTProtocol_add("file", "local", 0, YES, HTLoadFile, NULL);
303: HTProtocol_add("cache", "local", 0, YES, HTLoadCache, NULL);
304: #endif
2.75 frystyk 305: HTProtocol_add("telnet", "", 0, YES, HTLoadTelnet, NULL);
306: HTProtocol_add("tn3270", "", 0, YES, HTLoadTelnet, NULL);
307: HTProtocol_add("rlogin", "", 0, YES, HTLoadTelnet, NULL);
2.24 frystyk 308: }
2.1 timbl 309:
2.65 frystyk 310: /* REGISTER ALL KNOWN PROTOCOLS IN THE LIBRARY PREEMPTIVELY
311: ** --------------------------------------------------------
312: ** Not done automaticly - may be done by application!
313: */
314: PUBLIC void HTProtocolPreemptiveInit (void)
315: {
316: #ifndef DECNET
2.75 frystyk 317: HTProtocol_add("ftp", "tcp", FTP_PORT, YES, HTLoadFTP, NULL);
318: HTProtocol_add("nntp", "tcp", NEWS_PORT, YES, HTLoadNews, NULL);
319: HTProtocol_add("news", "tcp", NEWS_PORT, YES, HTLoadNews, NULL);
320: HTProtocol_add("gopher", "tcp", GOPHER_PORT, YES, HTLoadGopher, NULL);
2.65 frystyk 321: #ifdef HT_DIRECT_WAIS
2.75 frystyk 322: HTProtocol_add("wais", "", WAIS_PORT, YES, HTLoadWAIS, NULL);
2.65 frystyk 323: #endif
324: #endif /* DECNET */
325:
2.75 frystyk 326: HTProtocol_add("http", "buffered_tcp", HTTP_PORT, YES, HTLoadHTTP, NULL);
327: HTProtocol_add("file", "local", 0, YES, HTLoadFile, NULL);
328: HTProtocol_add("telnet", "", 0, YES, HTLoadTelnet, NULL);
329: HTProtocol_add("tn3270", "", 0, YES, HTLoadTelnet, NULL);
330: HTProtocol_add("rlogin", "", 0, YES, HTLoadTelnet, NULL);
331: HTProtocol_add("cache","local",0,YES,HTLoadCache, NULL);
2.61 frystyk 332: }
333:
2.48 frystyk 334: /* BINDINGS BETWEEN ICONS AND MEDIA TYPES
335: ** --------------------------------------
336: ** Not done automaticly - may be done by application!
337: ** For directory listings etc. you can bind a set of icons to a set of
338: ** media types and special icons for directories and other objects that
339: ** do not have a media type.
340: */
2.61 frystyk 341: PUBLIC void HTIconInit (const char * url_prefix)
2.58 eric 342: {
2.65 frystyk 343: const char * prefix = url_prefix ? url_prefix : ICON_LOCATION;
2.58 eric 344:
2.61 frystyk 345: HTIcon_addBlank("blank.xbm", prefix, NULL);
346: HTIcon_addDir("directory.xbm", prefix, "DIR");
347: HTIcon_addParent("back.xbm", prefix, "UP");
348: HTIcon_addUnknown("unknown.xbm", prefix, NULL);
349:
350: HTIcon_add("unknown.xbm", prefix, NULL, "*/*");
351: HTIcon_add("binary.xbm", prefix, "BIN", "binary");
352: HTIcon_add("unknown.xbm", prefix, NULL, "www/unknown");
353: HTIcon_add("text.xbm", prefix, "TXT", "text/*");
354: HTIcon_add("image.xbm", prefix, "IMG", "image/*");
355: HTIcon_add("movie.xbm", prefix, "MOV", "video/*");
356: HTIcon_add("sound.xbm", prefix, "AU", "audio/*");
357: HTIcon_add("tar.xbm", prefix, "TAR", "multipart/x-tar");
358: HTIcon_add("tar.xbm", prefix, "TAR", "multipart/x-gtar");
359: HTIcon_add("compressed.xbm",prefix, "CMP", "x-compress");
360: HTIcon_add("compressed.xbm",prefix, "GZP", "x-gzip");
361: HTIcon_add("index.xbm", prefix, "IDX", "application/x-gopher-index");
362: HTIcon_add("index2.xbm", prefix, "CSO", "application/x-gopher-cso");
363: HTIcon_add("telnet.xbm", prefix, "TEL", "application/x-gopher-telnet");
364: HTIcon_add("unknown.xbm", prefix, "DUP", "application/x-gopher-duplicate");
365: HTIcon_add("unknown.xbm", prefix, "TN", "application/x-gopher-tn3270");
2.65 frystyk 366:
367: /* Add global mapping to where to find the internal icons */
2.87 frystyk 368: {
369: char * curdir = HTGetCurrentDirectoryURL();
370: char * virtual = HTParse(ICON_LOCATION, curdir,
371: PARSE_ACCESS|PARSE_HOST|PARSE_PATH|PARSE_PUNCTUATION);
372: char * physical = NULL;
373: StrAllocCat(virtual, "*");
374:
375: {
376: char * str = NULL;
377: if ((str = (char *) HT_MALLOC(strlen(W3C_ICONS) + 4)) == NULL)
378: HT_OUTOFMEM("HTIconInit");
379: strcpy(str, W3C_ICONS);
380: if (*(str + strlen(str) - 1) != '/') strcat(str, "/");
381: strcat(str, "*");
382: physical = HTParse(str, curdir,
383: PARSE_ACCESS|PARSE_HOST|PARSE_PATH|PARSE_PUNCTUATION);
384: HT_FREE(str);
385: }
386: HTRule_addGlobal(HT_Pass, virtual, physical);
387: HT_FREE(virtual);
388: HT_FREE(physical);
389: HT_FREE(curdir);
390: }
2.58 eric 391: }
392:
2.57 eric 393: /* REGISTER ALL HTTP/1.1 MIME HEADERS
394: ** --------------------------------------------
395: ** Not done automaticly - may be done by application!
396: */
2.64 frystyk 397: PUBLIC void HTMIMEInit (void)
2.57 eric 398: {
399: struct {
400: char * string;
401: HTParserCallback * pHandler;
402: } fixedHandlers[] = {
2.61 frystyk 403: {"accept", &HTMIME_accept},
404: {"accept-charset", &HTMIME_acceptCharset},
405: {"accept-encoding", &HTMIME_acceptEncoding},
406: {"accept-language", &HTMIME_acceptLanguage},
407: {"accept-ranges", &HTMIME_acceptRanges},
408: {"authorization", NULL},
2.72 frystyk 409: {"cache-control", &HTMIME_cacheControl},
2.61 frystyk 410: {"connection", &HTMIME_connection},
411: {"content-encoding", &HTMIME_contentEncoding},
412: {"content-length", &HTMIME_contentLength},
413: {"content-range", &HTMIME_contentRange},
414: {"content-transfer-encoding", &HTMIME_contentTransferEncoding},
415: {"content-type", &HTMIME_contentType},
416: {"digest-MessageDigest", &HTMIME_messageDigest},
2.77 eric 417: {"keep-alive", &HTMIME_keepAlive},
2.61 frystyk 418: {"link", &HTMIME_link},
419: {"location", &HTMIME_location},
420: {"max-forwards", &HTMIME_maxForwards},
2.57 eric 421: {"mime-version", NULL},
2.61 frystyk 422: {"pragma", &HTMIME_pragma},
2.73 frystyk 423: {"protocol", &HTMIME_protocol},
424: {"protocol-info", &HTMIME_protocolInfo},
425: {"protocol-request", &HTMIME_protocolRequest},
2.66 frystyk 426: {"proxy-authenticate", &HTMIME_authenticate},
2.61 frystyk 427: {"proxy-authorization", &HTMIME_proxyAuthorization},
428: {"public", &HTMIME_public},
429: {"range", &HTMIME_range},
430: {"referer", &HTMIME_referer},
431: {"retry-after", &HTMIME_retryAfter},
2.62 frystyk 432: {"server", &HTMIME_server},
2.81 frystyk 433: {"trailer", &HTMIME_trailer},
2.85 frystyk 434: {"transfer-encoding", &HTMIME_transferEncoding},
2.61 frystyk 435: {"upgrade", &HTMIME_upgrade},
436: {"user-agent", &HTMIME_userAgent},
437: {"vary", &HTMIME_vary},
438: {"via", &HTMIME_via},
439: {"warning", &HTMIME_warning},
440: {"www-authenticate", &HTMIME_authenticate},
2.91 kahan 441: {"authentication-info", &HTMIME_authenticationInfo},
442: {"proxy-authentication-info", &HTMIME_proxyAuthenticationInfo}
2.57 eric 443: };
444: int i;
445:
446: for (i = 0; i < sizeof(fixedHandlers)/sizeof(fixedHandlers[0]); i++)
447: HTHeader_addParser(fixedHandlers[i].string, NO,
448: fixedHandlers[i].pHandler);
449: }
450:
Webmaster