You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by br...@apache.org on 2003/06/23 00:08:54 UTC
cvs commit: httpd-2.0/server protocol.c
brianp 2003/06/22 15:08:54
Modified: server protocol.c
Log:
Eliminate creation of a temporary table in ap_get_mime_headers_core()
Submitted by: Joe Schaefer <jo...@sunstarsys.com>
Reviewed by: Brian Pane
Revision Changes Path
1.132 +2 -6 httpd-2.0/server/protocol.c
Index: protocol.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -r1.131 -r1.132
--- protocol.c 15 Apr 2003 22:47:57 -0000 1.131
+++ protocol.c 22 Jun 2003 22:08:53 -0000 1.132
@@ -705,10 +705,6 @@
char *value;
apr_size_t len;
int fields_read = 0;
- apr_table_t *tmp_headers;
-
- /* We'll use apr_table_overlap later to merge these into r->headers_in. */
- tmp_headers = apr_table_make(r->pool, 50);
/*
* Read header lines until we get the empty separator line, a read error,
@@ -796,7 +792,7 @@
++value; /* Skip to start of value */
}
- apr_table_addn(tmp_headers, last_field, value);
+ apr_table_addn(r->headers_in, last_field, value);
/* reset the alloc_len so that we'll allocate a new
* buffer if we have to do any more folding: we can't
@@ -823,7 +819,7 @@
}
}
- apr_table_overlap(r->headers_in, tmp_headers, APR_OVERLAP_TABLES_MERGE);
+ apr_table_compress(r->headers_in, APR_OVERLAP_TABLES_MERGE);
}
AP_DECLARE(void) ap_get_mime_headers(request_rec *r)