Get your own customer support community
 

Conditional GET bug in Vivaty Player, hangs if resource was modified

I'm creating a 3D web application using X3D for my Masters university project and I was having problems viewing my application with Vivaty Player.

I spent a considerable amount of time debugging using a packet sniffer to try and figure out why VIvaty Player would work with some X3D examples online (such as those at x3dgraphics.com) but not my application.

The first thing I noticed was that two GET requests are actually sent when retrieving an X3D model over the web. The first GET is made by the host browser and the second GET is made by the Vivaty plugin. I'm not sure why this is necessary, but in normal circumstances it works. In the case of static X3D content the first GET results in a "200 OK" response from the server containing the XML and the second GET (made by the plugin) is a conditional GET which checks to see if the resource has been modified since the first GET and receives a "304 NOT MODIFIED" response. The plugin then renders the model with no problems.

However, in the case of my web application (which is written in Python using the Django framework) the content was being generated dynamically. Because the content is dynamic and not a static file, a Last Modified header is not sent by the HTTP server. This means that Vivaty does a conditional GET which checks to see if the resource was modified after some date far in the past, which it inevitably has.

If the Vivaty plugin receives a "200 OK" from the server in response to this second GET instead of the "304 NOT MODIFIED" response, it hangs.

I managed to fix the problem by enabling some Django middleware which intercepts the HTTP response and spoofs a Not Modified response to all conditional GETs.

I think that at least the fact that Vivaty hangs in certain circumstances represents a bug in the Vivaty Player.

I also noticed that when used with Internet Explorer, it appears the Vivaty Player will only render a resource if it has a recognised file extension, regardless of what the MIME type is set to.

So I have some questions.

1. Why is it necessary to send two GET requests?
2. Does IE require that a resource has a recognised file extension and not just follow the MIME type?
3. Why does Vivaty Player crash if it receives a 200 OK response instead of a 340 NOT MODIFIED?
 
sad I’m frustrated
Inappropriate?
1 person has this problem

User_default_medium