| "/help" -> return_help outchan
| "/getxml" ->
let uri = req#param "uri" in
- let fname = Http_getter.getxml uri in
+ let fname = Http_getter.getxml uri in (* local name, in cache *)
+ let remote_name = Http_getter.resolve uri in (* remote name *)
let src_enc = if is_gzip fname then `Gzipped else `Normal in
let enc = parse_enc req in
let fname, cleanup = convert_file ~from_enc:src_enc ~to_enc:enc fname in
let contenc = if enc = `Gzipped then Some "x-gzip" else None in
let patch_fun =
- if parse_patch req then Some (patch_fun_for uri fname) else None
+ if parse_patch req
+ then Some (patch_fun_for uri remote_name)
+ else None
in
let gunzip = (enc = `Gzipped) in
(try