Skip to content

Commit 474e212

Browse files
author
Brian Pane
committed
Remove old code that was ifdef'ed out in the last commit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-read-dev@353829 13f79535-47bb-0310-9956-ffa450edef68
1 parent b42c1e2 commit 474e212

File tree

1 file changed

+0
-75
lines changed

1 file changed

+0
-75
lines changed

server/protocol.c

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -786,88 +786,13 @@ AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r, apr_bucket_brigade *bb
786786
}
787787
return;
788788
}
789-
790-
#if 0
791-
if (last_field != NULL) {
792-
if ((len > 0) && ((*field == '\t') || *field == ' ')) {
793-
/* This line is a continuation of the preceding line(s),
794-
* so append it to the line that we've set aside.
795-
* Note: this uses a power-of-two allocator to avoid
796-
* doing O(n) allocs and using O(n^2) space for
797-
* continuations that span many many lines.
798-
*/
799-
apr_size_t fold_len = last_len + len + 1; /* trailing null */
800-
801-
if (fold_len >= (apr_size_t)(r->server->limit_req_fieldsize)) {
802-
r->status = HTTP_BAD_REQUEST;
803-
/* report what we have accumulated so far before the
804-
* overflow (last_field) as the field with the problem
805-
*/
806-
apr_table_setn(r->notes, "error-notes",
807-
apr_pstrcat(r->pool,
808-
"Size of a request header field "
809-
"after folding "
810-
"exceeds server limit.<br />\n"
811-
"<pre>\n",
812-
ap_escape_html(r->pool, last_field),
813-
"</pre>\n", NULL));
814-
return;
815-
}
816-
817-
if (fold_len > alloc_len) {
818-
char *fold_buf;
819-
alloc_len += alloc_len;
820-
if (fold_len > alloc_len) {
821-
alloc_len = fold_len;
822-
}
823-
fold_buf = (char *)apr_palloc(r->pool, alloc_len);
824-
memcpy(fold_buf, last_field, last_len);
825-
last_field = fold_buf;
826-
}
827-
memcpy(last_field + last_len, field, len +1); /* +1 for nul */
828-
last_len += len;
829-
folded = 1;
830-
}
831-
else /* not a continuation line */ {
832-
833-
apr_status_t rv;
834-
rv = set_mime_header(r, last_field);
835-
if (rv != APR_SUCCESS) {
836-
return;
837-
}
838-
839-
/* reset the alloc_len so that we'll allocate a new
840-
* buffer if we have to do any more folding: we can't
841-
* use the previous buffer because its contents are
842-
* now part of r->headers_in
843-
*/
844-
alloc_len = 0;
845-
846-
} /* end if current line is not a continuation starting with tab */
847-
}
848-
849-
/* Found a blank line, stop. */
850-
if (len == 0) {
851-
break;
852-
}
853-
854-
/* Keep track of this line so that we can parse it on
855-
* the next loop iteration. (In the folded case, last_field
856-
* has been updated already.)
857-
*/
858-
if (!folded) {
859-
last_field = field;
860-
last_len = len;
861-
}
862-
#else
863789
rv = process_request_line(r, field, 1);
864790
if (rv != APR_SUCCESS) {
865791
return;
866792
}
867793
if ((field == NULL) || (*field == '\0')) {
868794
return;
869795
}
870-
#endif /* 0 */
871796
}
872797
}
873798

0 commit comments

Comments
 (0)