ServeFolders plugin - Bad request 400 error

Hi,

I am trying to get the ServeFolders plugin working, but I am unable to
serve any files from it. I have compiled the plugin and it
successfully loads in Orthanc (version 1.0.0 on Ubuntu 14.10.). I am
tried to serve the same URI as the one in the readme file - namely
fosdem. The verbose output shows the following:

I0114 18:17:29.374818 MongooseServer.cpp:719] GET /fosdem/index.html
I0114 18:17:29.375740 OrthancPlugins.cpp:557] Delegating HTTP request
to plugin for URI: /fosdem/index.html

And the reply is a 400 message.

{ "HttpError" : "Bad Request", "HttpStatus" : 400, "Message" : "Bad
request", "Method" : "GET", "OrthancError" : "Bad request",
"OrthancStatus" : 8, "Uri" : "/fosdem/index.html" }

and for the url htttp://ip_address:8042/fosdem

{
   "HttpError" : "Not Found",
   "HttpStatus" : 404,
   "Message" : "Unknown resource",
   "Method" : "GET",
   "OrthancError" : "Unknown resource",
   "OrthancStatus" : 17,
   "Uri" : "/fosdem/"
}

The plugin is loaded and the directory to be served is accessible (I
have tried to serve a nonexisting directory and Orthanc did not
start).

The path in the config is:

  "ServeFolders" : {
    "/fosdem" : "/home/peter/fosdem"
  }

The remote access is allowed - both Orthanc and OrthancExplorer are
working correctly.

// Whether remote hosts can connect to the HTTP server
  "RemoteAccessAllowed" : true,

Is there anything with the configuration I might be missing?

Best regards,

peter

Hello,

This should work (tested here, and everything is OK). Make sure that:

  1. “/home/peter/fosdem/index.html” really exists.
  2. This file is accessible with the “orthanc” user. Indeed, the service of the Debian package is started as the user “orthanc”, that might not have access to a folder handled by the user “peter”. Here is a possible command line to check this:

    sudo -u orthanc ls -l /home/peter/fosdem/index.html

HTH,

Sébastien-