Roxen.git/
server/
base_server/
configuration.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2018-03-28
2018-03-28 10:04:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>
6e9032cac2530c06e524f419f42eb9a45ac0ea27 (
9
lines) (+
8
/-
1
)
[
Show
|
Annotate
]
Branch:
6e9032cac2530c06e524f419f42eb9a45ac0ea27
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...