comparison 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
comparison
equal deleted inserted replaced
84:a84291457608 85:ebce15865cce
390 { 390 {
391 if (uri.size() == 0) 391 if (uri.size() == 0)
392 { 392 {
393 if (method == "GET") 393 if (method == "GET")
394 { 394 {
395 output.Redirect("/app/explorer.html"); 395 output.Redirect("app/explorer.html");
396 } 396 }
397 else 397 else
398 { 398 {
399 output.SendMethodNotAllowedError("GET"); 399 output.SendMethodNotAllowedError("GET");
400 } 400 }
653 output.AnswerBufferWithContentType(png, "image/png"); 653 output.AnswerBufferWithContentType(png, "image/png");
654 return; 654 return;
655 } 655 }
656 catch (OrthancException&) 656 catch (OrthancException&)
657 { 657 {
658 output.Redirect("/app/images/Unsupported.png"); 658 std::string root = "";
659 for (size_t i = 1; i < uri.size(); i++)
660 {
661 root += "../";
662 }
663
664 output.Redirect(root + "app/images/Unsupported.png");
659 return; 665 return;
660 } 666 }
661 } 667 }
662 } 668 }
663 669