Branch: Tag:

2018-03-28

2018-03-28 10:04:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Configuration: Survive strange paths in make_fake_id().

Fixes some more of [WS200].

3082:    fake_id->misc->common = id->misc->common;    fake_id->conf = this_object();    -  fake_id->raw_url=s; +  // HTTP transport encode the path. +  // NB: This is required to make scan_for_query() happy. +  s = map(string_to_utf8(s)/"/", Protocols.HTTP.percent_encode) * "/";    -  +  fake_id->raw_url = s; +     if (fake_id->scan_for_query)    // FIXME: If we're using e.g. ftp this doesn't exist. But the    // right solution might be that clone_me() in an ftp id object
3093:       s = http_decode_string(s);    +  catch { s = utf8_to_string(s); }; +     s = Roxen.fix_relative (s, id);       // s is sent to Unix API's that take NUL-terminated strings...