httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: stop copying footers to r->headers_in?
Date Tue, 01 Apr 2014 21:59:19 GMT
On Tue, Apr 1, 2014 at 8:00 PM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
> Here is the corresponding patch.
> +static int parse_mime_headers(request_rec *r,
> +                              apr_bucket_brigade *bb,
> +                              apr_read_type_e block,
> +                              ap_filter_t *f, apr_table_t *t,
> +                              int *status, const char **html_notes,
> +                              ap_mime_state_t **state)
>  {
[snip]
> @@ -963,20 +1054,60 @@ static int field_name_len(const char *field)
>           * has been updated already.)
>           */
>          if (!folded) {
> -            last_field = field;
> -            last_len = len;
> +            s->last_field = field;
> +            s->last_len = len;
>          }
> +
> +        /* We may still be EAGAIN here */
> +        if (rv != APR_SUCCESS) {
> +            AP_DEBUG_ASSERT(APR_STATUS_IS_EAGAIN(rv));
> +            s->fold = 1;
> +            return rv;
> +        }
> +
> +        /* Found a blank line, stop. */
> +        if (len == 0) {
> +            s->done = 1;
> +            break;
> +        }

I missed to remove this same check in the original code just before
"if (!folded)" above.
Fixed for the next patch already.

Mime
View raw message