diff OrthancServer/OrthancRestApi.cpp @ 85:ebce15865cce

relative redirection
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 Sep 2012 09:26:50 +0200
parents 6212bf978584
children 2d96cb181f45 52c7eb60bbc8
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;
         }
       }