[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] [PATCH] Disable automatic wget headers.
From: |
Micro Necio |
Subject: |
Re: [Bug-wget] [PATCH] Disable automatic wget headers. |
Date: |
Thu, 2 May 2019 10:49:51 -0500 |
Hi.
We're working on the --disable-header feature.
We are taking into account the comment made by Dale Worley to avoid regression.
While implementing it we remarked that cmd_spec_header in init.c is just
appending any header read from the command line, allowing duplicates. Shouldn't
that be a string set? Or a dynamic array is used for performance? A set would
be useful to easily remove disabled headers.
Sulfastor
On Apr 28, 2019, at 21:19, Dale R. Worley <address@hidden> wrote:
>>> From bug #54769 (https://savannah.gnu.org/bugs/?54769).
>> Some servers doesn't handle well some headers. A --disable-header option
>> will ensure a request header
>> will not be included on the request. In addition a empty header value in
>> --header="headername: " will also disable
>> the request header.
>
> I may have missed it, but I don't see any updates to the documentation
> files for the new option.
>
> Also, is there a possibility that "a empty header value in
> --header="headername: " will also disable the request header." will
> cause problems because someone wants to specify a header with an empty
> value? RFC 7230 (the definition of HTTP) section 3.2 ("Header Fields")
> contains this BNF:
>
> header-field = field-name ":" OWS field-value OWS
>
> field-name = token
> field-value = *( field-content / obs-fold )
>
> which says that empty field-value's are allowed. OTOH, I've never seen
> an empty value in a header field of an HTTP request.
>
> I suggest that removing the definition of "an empty header value in
> --header means to suppress the header" is the safest way to make this
> change.
>
> Dale
>
- Re: [Bug-wget] [PATCH] Disable automatic wget headers.,
Micro Necio <=