Ticket #950 (closed Defect: fixed)

Opened 9 years ago

Last modified 8 years ago

JSON files served via DM file repo

Reported by: jri Owned by: jri
Priority: Minor Milestone: Release 4.8
Component: DeepaMehta Standard Distribution Version: 4.7
Keywords: Cc: dgf, Malte, JuergeN
Complexity: 2 Area:
Module: deepamehta-core

Description

The response of a file repo HTTP request contains no Content-Type header if the requested file's extension is .json. As a consequence Firefox displays not well-formed in the browser console. This is not a true problem but should be fixed. (In Chrome and Safari the problem does not appear).

Change History

comment:1 Changed 9 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 9 years ago by Jörg Richter <jri@…>

In 3073db1ce8d22ade585cac3121ce52bb651786d5/deepamehta:

Core: serve JSON files with Content-Type (#950).

JSON files served via DM file repo have a Content-Type header.

Now for serving the file repo the Core utilizes JavaUtils's getFileType() method, which relies on Java's file type map (along with manual additions). As a consequence MP3 files are now served with the proper audio/mpeg content type (instead audio/x-mpeg) and are played by Firefox :-)

See #950.

comment:3 Changed 9 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed

comment:4 Changed 9 years ago by Malte

This is great :) i just tested it with a ".webm" file on firefox!
Thanks!

comment:5 Changed 9 years ago by jri

  • Status changed from closed to reopened
  • Resolution fixed deleted

The same should be applied to the bundle resources served via /<bundle-symbolic-name>/...

At the moment a JSON bundle resource is served without Content-Type header.

comment:6 Changed 9 years ago by Jörg Richter <jri@…>

In 11ffba07fb9ef860312c490b0ec151fc45261426/deepamehta:

Serve JSON resources with Content-Type (#950).

JSON bundle resources (/<bundle-symbolic-name>/...) are served with Content-Type header.

The same MIME-type detection mechanism is used for serving both, the file system, and bundle resources.

See #950.

comment:7 Changed 8 years ago by jri

  • Status changed from reopened to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.