Am 02.10.2014 20:12, schrieb Joshua Judson Rosen:
> The tokens we're looking for (like "name") occur in Content-Disposition,
> and Content-Disposition may actually occur ahead of, or in the absence of,
> any Content-Type header; for example in multipart/form-data from an HTTP POST.
> 
> Signed-off-by: Joshua Judson Rosen <[email protected]>
> ---
>  mailutils/reformime.c |   11 ++---------
>  1 file changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/mailutils/reformime.c b/mailutils/reformime.c
> index 603f2bd..0f5d768 100644
> --- a/mailutils/reformime.c
> +++ b/mailutils/reformime.c
> @@ -99,18 +99,11 @@ static int parse(const char *boundary, char **argv)
>  
>               /* Split to tokens */
>               {
> -                     char *s, *p;
> +                     char *s;
>                       unsigned ntokens;
>                       const char *delims = ";=\" \t\n";
>  
> -                     /* Skip to last Content-Type: */
> -                     s = p = header;
> -                     while ((p = strchr(p, '\n')) != NULL) {
> -                             p++;
> -                             if (strncasecmp(p, "Content-Type:", 
> sizeof("Content-Type:")-1) == 0)
> -                                     s = p;
> -                     }
> -                     dbg_error_msg("L:'%s'", p);
> +                     s = header;
>                       ntokens = 0;
>                       s = strtok(s, delims);

why not
   s = strtok(header, delims);
do i miss something ?

re,
 wh

>                       while (s) {
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to