"Fossies" - the Fresh Open Source Software Archive 
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1
2 /* ====================================================================
3 *
4 * MOD_GZIP.C - Version 1.3.26.1a
5 *
6 * This program was developed by
7 *
8 * Remote Communications, Inc.
9 * Home page: http://www.RemoteCommunications.com
10 *
11 * and is currently maintained by
12 *
13 * Christian Kruse, <ckruse@wwwtech.de> and Michael Schroepl,
14 * <michael@schroepl.net>
15 * Home page: http://sourceforge.net/projects/mod-gzip/
16 *
17 * Original author: Kevin Kiley, CTO, Remote Communications, Inc.
18 * Email: Kiley@RemoteCommunications.com
19 *
20 * As of this writing there is an online support forum which
21 * anyone may join by following the instructions found at...
22 * http://lists.over.net/mailman/listinfo/mod_gzip
23 *
24 * ====================================================================
25 */
26
27 /* APACHE LICENSE: START
28 *
29 * Portions of this software are covered under the following license
30 * which, as it states, must remain included in this source code
31 * module and may not be altered in any way.
32 */
33
34 /* ====================================================================
35 * The Apache Software License, Version 1.1
36 *
37 * Copyright (c) 2000 The Apache Software Foundation. All rights
38 * reserved.
39 *
40 * Redistribution and use in source and binary forms, with or without
41 * modification, are permitted provided that the following conditions
42 * are met:
43 *
44 * 1. Redistributions of source code must retain the above copyright
45 * notice, this list of conditions and the following disclaimer.
46 *
47 * 2. Redistributions in binary form must reproduce the above copyright
48 * notice, this list of conditions and the following disclaimer in
49 * the documentation and/or other materials provided with the
50 * distribution.
51 *
52 * 3. The end-user documentation included with the redistribution,
53 * if any, must include the following acknowledgment:
54 * "This product includes software developed by the
55 * Apache Software Foundation (http://www.apache.org/)."
56 * Alternately, this acknowledgment may appear in the software itself,
57 * if and wherever such third-party acknowledgments normally appear.
58 *
59 * 4. The names "Apache" and "Apache Software Foundation" must
60 * not be used to endorse or promote products derived from this
61 * software without prior written permission. For written
62 * permission, please contact apache@apache.org.
63 *
64 * 5. Products derived from this software may not be called "Apache",
65 * nor may "Apache" appear in their name, without prior written
66 * permission of the Apache Software Foundation.
67 *
68 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
69 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
70 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
71 * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
72 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
73 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
74 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
75 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
76 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
77 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
78 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
79 * SUCH DAMAGE.
80 * ====================================================================
81 *
82 * This software consists of voluntary contributions made by many
83 * individuals on behalf of the Apache Software Foundation. For more
84 * information on the Apache Software Foundation, please see
85 * <http://www.apache.org/>.
86 *
87 * Portions of this software are based upon public domain software
88 * originally written at the National Center for Supercomputing Applications,
89 * University of Illinois, Urbana-Champaign.
90 */
91
92 /* APACHE LICENSE: END */
93
94 #include "httpd.h"
95 #include "http_config.h"
96 #include "http_log.h"
97
98 #include "mod_gzip.h"
99 #include "mod_gzip_debug.h"
100
101 #ifdef MOD_GZIP_DEBUG1
102
103 server_rec *mod_gzip_server_now = 0;
104
105 const char *npp( const char *s )
106 {
107 /* NOTE: This 'Null Pointer Protection' call is really only */
108 /* needed for the Solaris Operating System which seems to have */
109 /* some kind of problem handling NULL pointers passed to certain */
110 /* STDLIB calls. Sloaris will GP fault where all other OS's are OK. */
111
112 if ( s ) return s;
113 else return "NULL";
114 }
115
116 #ifdef MOD_GZIP_LOG_IS_APACHE_LOG
117
118 void mod_gzip_printf( const char *fmt, ... )
119 {
120 int l;
121
122 va_list ap;
123
124 char log_line[2048];
125
126 va_start( ap, fmt );
127
128 l = vsprintf( log_line, fmt, ap );
129
130 va_end(ap);
131
132 ap_log_error( "",0,APLOG_NOERRNO|APLOG_DEBUG, mod_gzip_server_now, log_line);
133
134 return;
135 }
136
137 #else
138
139 void mod_gzip_printf( const char *fmt, ... )
140 {
141 int l;
142 char *p1;
143 FILE *log;
144
145 va_list ap;
146
147 char logname[256];
148 char log_line[4096];
149
150 #ifdef WIN32
151 long pid = GetCurrentProcessId();
152 #else
153 long pid = (long) getpid();
154 #endif
155
156 #ifdef WIN32
157 sprintf( logname, "c:\\temp\\t%ld.log",(long)pid);
158 #else
159 sprintf( logname, "/tmp/t%ld.log",(long)pid);
160 #endif
161
162 log = fopen( logname,"a" );
163
164 if ( !log )
165 {
166 return;
167 }
168
169 va_start( ap, fmt );
170
171 l = vsprintf(log_line, fmt, ap);
172
173 p1=log_line;
174 while((*p1!=0)&&(*p1!=13)&&(*p1!=10)) p1++;
175 *p1=0;
176
177 fprintf( log, "%s\n", log_line );
178
179 fclose( log );
180
181 va_end(ap);
182
183 return;
184 }
185
186 #endif
187
188 void mod_gzip_hexdump( char *buffer, int buflen )
189 {
190 int i,o1,o2,o3;
191
192 int len1;
193 int len2;
194
195 char ch1;
196 char ch2;
197 char s[40];
198 char l1[129];
199 char l2[129];
200 char l3[300];
201
202 long offset1=0L;
203
204 o1=0;
205 o2=0;
206 o3=0;
207
208 l1[0] = 0;
209 l2[0] = 0;
210 l3[0] = 0;
211
212 offset1 = 0;
213
214 for ( i=0; i<buflen; i++ )
215 {
216 ch1 = (char) *buffer++;
217
218 #define DUMPIT_ASTERISK 42
219 #define DUMPIT_LAPOSTROPHE 96
220 #define DUMPIT_RAPOSTROPHE 39
221 #define DUMPIT_PERIOD 46
222 #define DUMPIT_CR 67
223 #define DUMPIT_LF 76
224
225 #ifdef MASK_ONLY_CERTAIN_CHARS
226 if ( ch1 == 0 ) ch2 = DUMPIT_PERIOD;
227 else if ( ch1 == 13 ) ch2 = DUMPIT_CR;
228 else if ( ch1 == 10 ) ch2 = DUMPIT_LF;
229 else if ( ch1 == 9 ) ch2 = DUMPIT_LAPOSTROPHE;
230 else ch2 = ch1;
231 #endif
232
233 #define MASK_ALL_NON_PRINTABLE_CHARS
234 #ifdef MASK_ALL_NON_PRINTABLE_CHARS
235
236 if ( ch1 == 13 ) ch2 = DUMPIT_CR;
237 else if ( ch1 == 10 ) ch2 = DUMPIT_LF;
238 else if ( ch1 < 32 ) ch2 = DUMPIT_PERIOD;
239 else if ( ch1 > 126) ch2 = DUMPIT_LAPOSTROPHE;
240 else if ( ch1 == 37 ) ch2 = DUMPIT_ASTERISK;
241 else if ( ch1 == 92 ) ch2 = DUMPIT_ASTERISK;
242 else ch2 = ch1;
243
244 #endif
245
246 l2[o2++] = ch2;
247
248 sprintf( s, "%02X", ch1 );
249
250 if ( mod_gzip_strlen(s) > 2 ) s[2]=0;
251
252 len1 = mod_gzip_strlen(s);
253 len2 = mod_gzip_strlen(l1);
254
255 if ( mod_gzip_strlen(l1) < (int)(sizeof(l1) - (len1+1)) )
256 {
257 strcat( l1, s );
258 strcat( l1, " " );
259 }
260
261 if ( o2 >= 16 )
262 {
263 l2[o2]=0;
264
265 mod_gzip_printf( "%6lu| %-49.49s| %-16.16s |", offset1, l1, l2 );
266
267 offset1 += o2;
268
269 o1=0;
270 o2=0;
271 o3=0;
272
273 l1[0] = 0;
274 l2[0] = 0;
275 l3[0] = 0;
276 }
277 }
278
279 if ( o2 > 0 )
280 {
281 l2[o2]=0;
282
283 mod_gzip_printf( "%6lu| %-49.49s| %-16.16s |", offset1, l1, l2 );
284
285 offset1 += o2;
286
287 o1 = o2 = o3 = 0;
288
289 l1[0] = 0;
290 l2[0] = 0;
291 l3[0] = 0;
292 }
293 }
294
295 int mod_gzip_log_comerror( request_rec *r, char *p, int error )
296 {
297 int i=0;
298 char b[3][90];
299
300 b[0][0]=0;
301 b[1][0]=0;
302 b[2][0]=0;
303
304 #if defined(WIN32) || defined(NETWARE)
305
306 if ( error == WSANOTINITIALISED )
307 {
308 sprintf(b[0],"%s * WSANOTINITIALISED",p);
309 sprintf(b[1],"%s * A successful WSAStartup() must occur",p);
310 sprintf(b[2],"%s * before using this WINSOCK API call.",p);
311 }
312 else if ( error == WSAENETDOWN )
313 {
314 sprintf(b[0],"%s * WSAENETDOWN",p);
315 sprintf(b[1],"%s * The Windows Sockets implementation has detected",p);
316 sprintf(b[2],"%s * that the network subsystem has failed.",p);
317 }
318 else if ( error == WSAENOTCONN )
319 {
320 sprintf(b[0],"%s * WSAENOTCONN",p);
321 sprintf(b[1],"%s * The socket is not connected.",p);
322 }
323 else if ( error == WSAEINTR )
324 {
325 sprintf(b[0],"%s * WSAEINTR",p);
326 sprintf(b[1],"%s * The (blocking) call was cancelled",p);
327 sprintf(b[2],"%s * via WSACancelBlockingCall()",p);
328 }
329 else if ( error == WSAEINPROGRESS )
330 {
331 sprintf(b[0],"%s * WSAEINPROGRESS",p);
332 sprintf(b[1],"%s * A blocking Windows Sockets operation",p);
333 sprintf(b[2],"%s * is in progress.",p);
334 }
335 else if ( error == WSAENOTSOCK )
336 {
337 sprintf(b[0],"%s * WSAENOTSOCK",p);
338 sprintf(b[1],"%s * The descriptor is not a socket.",p);
339 }
340 else if ( error == WSAEOPNOTSUPP )
341 {
342 sprintf(b[0],"%s * WSAEOPNOTSUPP",p);
343 sprintf(b[1],"%s * MSG_OOB was specified, but the socket is",p);
344 sprintf(b[2],"%s * not of type SOCK_STREAM.",p);
345 }
346 else if ( error == WSAESHUTDOWN )
347 {
348 sprintf(b[0],"%s * WSAESHUTDOWN",p);
349 sprintf(b[1],"%s * The socket has been shutdown.",p);
350 }
351 else if ( error == WSAEWOULDBLOCK )
352 {
353 sprintf(b[0],"%s * WSAEWOULDBLOCK",p);
354 sprintf(b[1],"%s * The socket is marked as non-blocking",p);
355 sprintf(b[2],"%s * and receive operation would block.",p);
356 }
357 else if ( error == WSAEMSGSIZE )
358 {
359 sprintf(b[0],"%s * WSAEMSGSIZE",p);
360 sprintf(b[1],"%s * The datagram was too large to",p);
361 sprintf(b[2],"%s * fit into the specified buffer.",p);
362 }
363 else if ( error == WSAEINVAL )
364 {
365 sprintf(b[0],"%s * WSAEINVAL",p);
366 sprintf(b[1],"%s * The socket has not been bound with bind().",p);
367 }
368 else if ( error == WSAECONNABORTED )
369 {
370 sprintf(b[0],"%s * WSAECONNABORTED",p);
371 sprintf(b[1],"%s * The virtual circuit was aborted",p);
372 sprintf(b[2],"%s * due to timeout or other failure.",p);
373 }
374 else if ( error == WSAECONNRESET )
375 {
376 sprintf(b[0],"%s * WSAECONNRESET",p);
377 sprintf(b[1],"%s * The virtual circuit was reset by the remote side.",p);
378 }
379 else
380 {
381 sprintf(b[0],"%s * WSA????",p);
382 sprintf(b[1],"%s * Unexpected WINSOCK error code %d",p,error);
383 }
384
385 #else
386
387 if ( error == EBADF ) sprintf(b[0],"%s * EBADF", p );
388 else if ( error == EAGAIN ) sprintf(b[0],"%s * EAGAIN",p );
389 else if ( error == EDQUOT ) sprintf(b[0],"%s * EDQUOT",p );
390 else if ( error == EFAULT ) sprintf(b[0],"%s * EFAULT",p );
391 else if ( error == EFBIG ) sprintf(b[0],"%s * EFBIG", p );
392 else if ( error == EINTR ) sprintf(b[0],"%s * EINTR", p );
393 else if ( error == EINVAL ) sprintf(b[0],"%s * EINVAL",p );
394 else if ( error == EIO ) sprintf(b[0],"%s * EIO", p );
395 else if ( error == ENOSPC ) sprintf(b[0],"%s * ENOSPC",p );
396 else if ( error == ENXIO ) sprintf(b[0],"%s * ENXIO", p );
397 else if ( error == EPIPE ) sprintf(b[0],"%s * EPIPE", p );
398 else if ( error == ERANGE ) sprintf(b[0],"%s * ERANGE",p );
399 else if ( error == EINVAL ) sprintf(b[0],"%s * EINVAL",p );
400 else if ( error == EWOULDBLOCK ) sprintf(b[0],"%s * EWOULDBLOCK",p );
401
402 else
403 {
404 sprintf(b[0],"%s * E???? Unexpected error code %d",p,error);
405 }
406
407 #endif
408
409 for ( i=0; i<3; i++ )
410 {
411 if ( b[i][0] != 0 )
412 {
413 #ifdef MOD_GZIP_DEBUG1
414 mod_gzip_printf("%s",npp(b[i]));
415 #endif
416 }
417 }
418
419 return( 1 );
420 }
421
422 int mod_gzip_translate_comerror( int error, char *buf )
423 {
424 char bb[40];
425
426 if ( buf == 0 )
427 {
428 return 0;
429 }
430
431 #if defined(WIN32) || defined(NETWARE)
432
433 if ( error == WSANOTINITIALISED ) sprintf(bb,"WSANOTINITIALISED");
434 else if ( error == WSAENETDOWN ) sprintf(bb,"WSAENETDOWN");
435 else if ( error == WSAENOTCONN ) sprintf(bb,"WSAENOTCONN");
436 else if ( error == WSAEINTR ) sprintf(bb,"WSAEINTR");
437 else if ( error == WSAEINPROGRESS ) sprintf(bb,"WSAEINPROGRESS");
438 else if ( error == WSAENOTSOCK ) sprintf(bb,"WSAENOTSOCK");
439 else if ( error == WSAEOPNOTSUPP ) sprintf(bb,"WSAEOPNOTSUPP");
440 else if ( error == WSAESHUTDOWN ) sprintf(bb,"WSAESHUTDOWN");
441 else if ( error == WSAEWOULDBLOCK ) sprintf(bb,"WSAEWOULDBLOCK");
442 else if ( error == WSAEMSGSIZE ) sprintf(bb,"WSAEMSGSIZE");
443 else if ( error == WSAEINVAL ) sprintf(bb,"WSAEINVAL");
444 else if ( error == WSAECONNABORTED ) sprintf(bb,"WSAECONNABORTED");
445 else if ( error == WSAECONNRESET ) sprintf(bb,"WSAECONNRESET");
446 else sprintf(bb,"%d=WSA????",error);
447
448 #else
449
450 if ( error == EBADF ) sprintf(bb,"EBADF" );
451 else if ( error == EAGAIN ) sprintf(bb,"EAGAIN" );
452 else if ( error == EDQUOT ) sprintf(bb,"EDQUOT" );
453 else if ( error == EFAULT ) sprintf(bb,"EFAULT" );
454 else if ( error == EFBIG ) sprintf(bb,"EFBIG" );
455 else if ( error == EINTR ) sprintf(bb,"EINTR" );
456 else if ( error == EINVAL ) sprintf(bb,"EINVAL" );
457 else if ( error == EIO ) sprintf(bb,"EIO" );
458 else if ( error == ENOSPC ) sprintf(bb,"ENOSPC" );
459 else if ( error == ENXIO ) sprintf(bb,"ENXIO" );
460 else if ( error == EPIPE ) sprintf(bb,"EPIPE" );
461 else if ( error == ERANGE ) sprintf(bb,"ERANGE" );
462 else if ( error == EINVAL ) sprintf(bb,"EINVAL" );
463 else if ( error == EWOULDBLOCK ) sprintf(bb,"EWOULDBLOCK" );
464 else sprintf(bb,"%d=E????",error);
465
466 #endif
467
468 mod_gzip_strcpy( buf, bb );
469
470 return( 1 );
471 }
472
473 #if defined(MOD_GZIP_DEBUG1_SHOW_REQUEST_RECORD2) || defined(MOD_GZIP_DEBUG1_SHOW_REQUEST_RECORD1)
474 int mod_gzip_show_request_record(
475 request_rec *r,
476 char *cn
477 )
478 {
479 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
480 mod_gzip_printf( "%s: REQUEST RECORD SNAPSHOT",cn);
481 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
482 mod_gzip_printf( "%s: r = %ld", cn, (long) r );
483 mod_gzip_printf( "%s: r->connection->keepalive=%d", cn, r->connection->keepalive );
484 mod_gzip_printf( "%s: r->the_request=[%s]", cn, npp(r->the_request) );
485 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
486 mod_gzip_printf( "%s: r->next = %ld",cn,(long)r->next);
487 mod_gzip_printf( "%s: r->prev = %ld",cn,(long)r->prev);
488 mod_gzip_printf( "%s: r->main = %ld",cn,(long)r->main);
489 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
490 mod_gzip_printf( "%s: r->sent_bodyct = %ld",cn,(long)r->sent_bodyct);
491 mod_gzip_printf( "%s: r->bytes_sent = %ld",cn,(long)r->bytes_sent);
492 mod_gzip_printf( "%s: r->chunked = %ld",cn,(long)r->chunked);
493 mod_gzip_printf( "%s: r->byterange = %ld",cn,(long)r->byterange);
494 mod_gzip_printf( "%s: r->clength = %ld (The 'real' content length )",cn,(long)r->clength);
495 mod_gzip_printf( "%s: r->byterange = %ld",cn,(long)r->remaining);
496 mod_gzip_printf( "%s: r->read_length = %ld",cn,(long)r->read_length);
497 mod_gzip_printf( "%s: r->read_body = %ld",cn,(long)r->read_body);
498 mod_gzip_printf( "%s: r->read_chunked = %ld",cn,(long)r->read_chunked);
499 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
500 mod_gzip_printf( "%s: *IN: r->uri =[%s]", cn, npp(r->uri));
501 mod_gzip_printf( "%s: *IN: r->unparsed_uri =[%s]", cn, npp(r->unparsed_uri));
502 mod_gzip_printf( "%s: *IN: r->filename =[%s]", cn, npp(r->filename));
503 mod_gzip_printf( "%s: *IN: r->path_info =[%s]", cn, npp(r->path_info));
504 mod_gzip_printf( "%s: *IN: r->args =[%s]", cn, npp(r->args));
505 mod_gzip_printf( "%s: *IN: r->header_only =%d", cn, r->header_only );
506 mod_gzip_printf( "%s: *IN: r->protocol =[%s]", cn, npp(r->protocol));
507 mod_gzip_printf( "%s: *IN: r->proto_num =%d", cn, r->proto_num );
508 mod_gzip_printf( "%s: *IN: r->hostname =[%s]", cn, npp(r->hostname));
509 mod_gzip_printf( "%s: *IN: r->the_request =[%s]", cn, npp(r->the_request));
510 mod_gzip_printf( "%s: *IN: r->assbackwards =%d", cn, r->assbackwards );
511 mod_gzip_printf( "%s: *IN: r->status_line =[%s]", cn, npp(r->status_line));
512 mod_gzip_printf( "%s: *IN: r->status =%d", cn, r->status );
513 mod_gzip_printf( "%s: *IN: r->method =[%s]", cn, npp(r->method));
514 mod_gzip_printf( "%s: *IN: r->method_number =%d", cn, r->method_number );
515 mod_gzip_printf( "%s: *IN: r->content_type =[%s]", cn, npp(r->content_type));
516 mod_gzip_printf( "%s: *IN: r->handler =[%s]", cn, npp(r->handler));
517 mod_gzip_printf( "%s: *IN: r->content_encoding =[%s]", cn, npp(r->content_encoding));
518 mod_gzip_printf( "%s: *IN: r->content_language =[%s]", cn, npp(r->content_language));
519 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
520 mod_gzip_printf( "%s: *IN: r->parsed_uri.scheme =[%s]", cn, npp(r->parsed_uri.scheme));
521 mod_gzip_printf( "%s: *IN: r->parsed_uri.hostinfo =[%s]", cn, npp(r->parsed_uri.hostinfo));
522 mod_gzip_printf( "%s: *IN: r->parsed_uri.user =[%s]", cn, npp(r->parsed_uri.user));
523 mod_gzip_printf( "%s: *IN: r->parsed_uri.password =[%s]", cn, npp(r->parsed_uri.password));
524 mod_gzip_printf( "%s: *IN: r->parsed_uri.hostname =[%s]", cn, npp(r->parsed_uri.hostname));
525 mod_gzip_printf( "%s: *IN: r->parsed_uri.port_str =[%s]", cn, npp(r->parsed_uri.port_str));
526 mod_gzip_printf( "%s: *IN: r->parsed_uri.port =%u", cn, r->parsed_uri.port );
527 mod_gzip_printf( "%s: *IN: r->parsed_uri.path =[%s]", cn, npp(r->parsed_uri.path));
528 mod_gzip_printf( "%s: *IN: r->parsed_uri.query =[%s]", cn, npp(r->parsed_uri.query));
529 mod_gzip_printf( "%s: *IN: r->parsed_uri.fragment =[%s]", cn, npp(r->parsed_uri.fragment));
530 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
531 mod_gzip_printf( "%s: 'r->headers_in'...",cn);
532 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
533 mod_gzip_dump_a_table( r, (_table *) r->headers_in );
534 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
535 mod_gzip_printf( "%s: 'r->headers_out'...",cn);
536 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
537 mod_gzip_dump_a_table( r, (_table *) r->headers_out );
538 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
539 mod_gzip_printf( "%s: 'r->err_headers_out'...",cn);
540 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
541 mod_gzip_dump_a_table( r, (_table *) r->err_headers_out );
542 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
543 mod_gzip_printf( "%s: 'r->subprocess_env'...",cn);
544 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
545 mod_gzip_dump_a_table( r, (_table *) r->subprocess_env );
546 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
547 mod_gzip_printf( "%s: 'r->notes'...",cn);
548 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
549 mod_gzip_dump_a_table( r, (_table *) r->notes );
550 mod_gzip_printf( "%s: -------------------------------------------------------------",cn);
551
552 if ( r->next )
553 {
554 mod_gzip_printf( "%s: r->next is valid... showing 'r->next' record...",cn);
555
556 mod_gzip_show_request_record( r->next, cn );
557 }
558
559 return 1;
560 }
561 #endif
562
563 int mod_gzip_dump_a_table( request_rec *r, _table *t )
564 {
565 table_entry *elts = (table_entry *) t->a.elts;
566 int i;
567
568 char cn[]="mod_gzip_dump_a_table()";
569
570 for ( i = 0; i < t->a.nelts; i++ )
571 {
572 mod_gzip_printf( "%s: %3.3d key=[%s] val=[%s]",
573 cn,i,npp(elts[i].key),npp(elts[i].val));
574 }
575
576 return 0;
577 }
578
579 #endif
580
581 /* eof */