nlplab/brat

Brat standalone seems to start fine, but browsers download the xhtml files instead of running it

yampeku opened this issue · 8 comments

Installed brat (./install.sh) in a fresh unix machine with python 2.7.
When running the standalone server, no errors are displayed (Serving brat at http://127.0.0.1:8001)
However, when I access the server, I get a 'Redirecting...' message and then the index.xhtml is downloaded. Seems to happen also to any other xhtml file.
The troubleshooting script says

Didn't receive json data when accessing "http://127.0.0.1:8001/ajax.cgi", instead we received application/octet-stream.
Have you perhaps forgotten to add a handler for CGI in your web server configuration?

But I can't find documentation for any of that in the installation manual.

Chrome error message in console is

Resource interpreted as Document but transferred with MIME type application/octet-stream: "http://machineip:8001/index.xhtml".

Which seems to imply that something is misconfigured in the standalone server, but I'm not sure what.

I have the exact same issue, have you made any progress?

used the self contained version in the end

Thanks for the quick reply! What exactly do you mean by the self contained version? How can I use it? I couldn't find anything about that in the documentation. Do you mean you set up a CGI server?

For anyone reading looking for a solution, I found my solution in this issue instead: #1202

btyu commented

For anyone reading looking for a solution, I found my solution in this issue instead: #1202

Could you expand your solution. I am using manjaro (arch linux), and have installed mailcap. It's still not working.

Sorry to hear that, installing mailcap was enough for me on Oracle Linux.

btyu commented

Thank you for the quick reply. I'll try to find the solutions for Arch Linux.

btyu commented

According to my attempts, using another browser may help on Arch Linux:
local browser: Chromium, brat server: running on another Ubuntu machine, result: rendered correctly.
local browser: Chromium, brat server: running locally on Arch Linux, result: downloading file.
local browser: Chrome or Firefox, brat server: running locally on Arch Linux, result: rendered correctly.

I guess it may be related to some rendering settings of local files on Chromium. Anyway, problem solved.