changeset 85:ebce15865cce

relative redirection
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 Sep 2012 09:26:50 +0200
parents a84291457608
children de8a5329b069
files OrthancServer/OrthancRestApi.cpp
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi.cpp	Tue Sep 25 15:01:06 2012 +0200
+++ b/OrthancServer/OrthancRestApi.cpp	Wed Sep 26 09:26:50 2012 +0200
@@ -392,7 +392,7 @@
     {
       if (method == "GET")
       {
-        output.Redirect("/app/explorer.html");
+        output.Redirect("app/explorer.html");
       }
       else
       {
@@ -655,7 +655,13 @@
         }
         catch (OrthancException&)
         {
-          output.Redirect("/app/images/Unsupported.png");
+          std::string root = "";
+          for (size_t i = 1; i < uri.size(); i++)
+          {
+            root += "../";
+          }
+
+          output.Redirect(root + "app/images/Unsupported.png");
           return;
         }
       }