xml3d / xml3d.js

The WebGL/JS implementation of XML3D
Other
75 stars 25 forks source link

Improve error handling for responses without content-type header #103

Closed csvurt closed 9 years ago

csvurt commented 9 years ago

Currently a missing content-type header in a response for an external resource will throw an unhelpful exception:

Uncaught TypeError: Cannot read property 'indexOf' of null in setDocumentData

We should handle cases where the content-type header is missing more gracefully since it may be a common stumbling block for people using a local server that isn't configured to include content-type information.