pier 00/11/27 04:50:12 Modified: connectors/src/apache-1.3 mod_webapp.c Added: connectors/src Makedefs.orig Log: Fixed header handling Revision Changes Path 1.1 jakarta-tomcat-4.0/connectors/src/Makedefs.orig Index: Makedefs.orig =================================================================== CC = gcc AR = ar APXS = apxs CFLAGS = -O6 -Wall -Wstrict-prototypes INCLUDES = -I../webapplib LIBS = -L../webapplib -lwebapp .c.o: $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ 1.3 +8 -2 jakarta-tomcat-4.0/connectors/src/apache-1.3/mod_webapp.c Index: mod_webapp.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/src/apache-1.3/mod_webapp.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mod_webapp.c 2000/11/27 03:49:13 1.2 +++ mod_webapp.c 2000/11/27 12:50:00 1.3 @@ -55,7 +55,7 @@ * * * ========================================================================= */ -// CVS $Id: mod_webapp.c,v 1.2 2000/11/27 03:49:13 pier Exp $ +// CVS $Id: mod_webapp.c,v 1.3 2000/11/27 12:50:00 pier Exp $ // Author: Pier Fumagalli <mailto:[EMAIL PROTECTED]> #include <httpd.h> @@ -183,13 +183,14 @@ req->protocol=r->protocol; // Copy headers into webapp request structure - if (!r->headers_in) { + if (r->headers_in!=NULL) { array_header *arr=ap_table_elts(r->headers_in); table_entry *ele=(table_entry *)arr->elts; int count=arr->nelts; int x=0; // Allocate memory for pointers + req->header_count=count; req->header_names=(char **)ap_palloc(r->pool,count*sizeof(char *)); req->header_values=(char **)ap_palloc(r->pool,count*sizeof(char *)); @@ -199,6 +200,11 @@ req->header_names[x]=ele[x].key; req->header_values[x]=ele[x].val; } + } else { + fprintf(stderr,"NO HEADERS\n"); + req->header_count=0; + req->header_names=NULL; + req->header_values=NULL; } // Try to handle the request