bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [Patch] fix bug #44628 not honoring RFC 6266 in --content


From: Miquel Llobet
Subject: Re: [Bug-wget] [Patch] fix bug #44628 not honoring RFC 6266 in --content-disposition
Date: Wed, 1 Apr 2015 17:35:21 +0200

it should work now, sorry.

Miquel Llobet



On Wed, Apr 1, 2015 at 4:57 PM, Giuseppe Scrivano <address@hidden> wrote:

> Miquel Llobet <address@hidden> writes:
>
> > The problem was that parse_content_disposition treated the values
> > "filename" and "filename*" as the same and concatenated both values. RFC
> > 6266 states that if both are present, "filename*" should have preference.
> >
> > Now, the patch is tricky, because in this case:
> >
> > attachment; filename*="A.ext"; filename*0="hello";
> filename*1="world.ext",
> >
> > the final filename should be A.ext.
> >
> > But modify_param_name in http.c changes the names with '*' to end with
> the
> > first occurrence of '*', this makes it hard to differentiate both cases.
> > Instead of fixing this and dealing with lots of edge cases I just check
> for
> > the name to be "filename", end with "*" and have the next character not
> to
> > be a digit. Do you think this is fine or it's best to get
> modify_param_name
> > to do it's job better?
> >
> > I also added more unit tests to account for the edge cases.
>
> thanks for your contribution, I am having some problems trying to apply
> your patch using git: "fatal: corrupt patch at line 49".  Could you
> please verify if it was generated correctly?
>
> Thanks,
> Giuseppe
>

Attachment: 0001-Fixed-44628-honoring-RFC-6266-content-disposition.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]