Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yampeku opened this issue Dec 16, 2020 · 8 comments

Comments

@yampeku
Copy link

yampeku commented Dec 16, 2020

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.

@dogatekin
Copy link

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

@yampeku
Copy link
Author

yampeku commented Mar 4, 2021

used the self contained version in the end

@dogatekin
Copy link

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?

@dogatekin
Copy link

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

@btyu
Copy link

btyu commented Mar 16, 2021

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.

@dogatekin
Copy link

dogatekin commented Mar 16, 2021

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

@btyu
Copy link

btyu commented Mar 16, 2021

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

@btyu
Copy link

btyu commented Mar 16, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants