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 18:05:49 GMT
On Tue, Apr 1, 2014 at 8:00 PM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
> +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)
>  {
> -    char *last_field = NULL;
> -    apr_size_t last_len = 0;
> -    apr_size_t alloc_len = 0;
>      char *field;
>      char *value;
>      apr_size_t len;
> -    int fields_read = 0;
>      char *tmp_field;
> +    ap_mime_state_t x, *s;
>      core_server_config *conf =
> ap_get_core_module_config(r->server->module_config);
>
> +    if (!state) {
> +        s = &x;
> +        memset(&s, 0, sizeof *s);

Oups, read memset(s, 0, sizeof *s) here.

> +    }
> +    else if (!(s = *state)) {
> +        *state = s = apr_pcalloc(r->pool, sizeof(ap_mime_state_t));
> +    }
> +    else if (s->done) {
> +        return APR_EOF;
> +    }
> +

Mime
View raw message