this.http_server = http_server;
}
- public HTTPItemURI.from_string (string uri, string server_root = "")
+ public HTTPItemURI.from_string (string uri,
+ HTTPServer http_server)
throws HTTPRequestError {
// do not decode the path here as it may contain encoded slashes
this.thumbnail_index = -1;
this.transcode_target = null;
- var request_uri = uri.replace (server_root, "");
+ this.http_server = http_server;
+
+ var request_uri = uri.replace (http_server.path_root, "");
var parts = request_uri.split ("/");
if (parts.length < 2 || parts.length % 2 == 0) {
protected virtual async void handle () {
try {
this.uri = new HTTPItemURI.from_string (this.msg.uri.path,
- this.http_server.path_root);
+ this.http_server);
} catch (Error error) {
this.handle_error (error);
private async string get_original_uri () throws Error {
var uri = new HTTPItemURI.from_string (this.destination_uri,
- this.http_server.path_root);
+ this.http_server);
var media_object = yield this.root_container.find_object (uri.item_id,
null);