wget: handle URLs with @ or hash differently
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 24 Apr 2018 11:35:32 +0000 (13:35 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 24 Apr 2018 11:35:32 +0000 (13:35 +0200)
commitdf45eb49acaeb64574e14f78c6bb5b95f1157058
tree7e6dc15d1eea8b9b6461489de3609ed0db1555af
parentf4eaccbfaee58d00f53fe106d018f4e9687b2e27
wget: handle URLs with @ or hash differently

If server replied with 302 and

Location: ?foo

we used to underflow the allocated space while trying to form the "@foo"
filename. Switch to forming "foo" filename.

function                                             old     new   delta
packed_usage                                       32795   32799      +4
parse_url                                            387     352     -35
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 4/-35)             Total: -31 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/wget.c