Question

I'm using the SimpleHTTPServer (invoked in a folder output):

python -m SimpleHTTPServer 8080

I have the following folder structure:

/output/
   images/
       figure.svg
   index.html

In index.html (among other things):

<div class="figure align-right">
   <object data="images/figure.svg" type="image/svg+xml"></object>
   <p class="caption">Some caption.</p>
   <div class="legend">Something</div>
</div>

Now I view index.html on http://127.0.0.1:8080/index.html and the figure is NOT displayed. Why? The server finds the file as it gives no 404 code.

The funny thing is that when I open index.html in the browser as a local file (not through the http server) the image appears.

I'm using Opera if that matters.

Was it helpful?

Solution

As suggested in the comments, find solution here: http://gotmetoo.blogspot.fr/2013/07/python-simple-http-server-with-svg.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top