staticfile-buildpack icon indicating copy to clipboard operation
staticfile-buildpack copied to clipboard

Missing mime type for otf files (opentype fonts) ?

Open arnaudruffin opened this issue 2 years ago • 5 comments

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version? CF :

  • api_version 2.195.0
  • osbapi_version 2.15 CF-CLI: 8.2.0+fd8fbca64.2022-02-09

What version of the buildpack you are using? staticfile_buildpack_v1_5_36

If you were attempting to accomplish a task, what was it you were attempting to do? I expose some otf assets

What did you expect to happen? I would expect them to be exposed with "Content-Type: font/otf" (and with Content-Encoding: gzip)

What was the actual behavior? The files are served, but with Content-Type: application/octet-stream

I am under the impression that the configuration is missing from mime.types. I saw the following issue + PR https://github.com/cloudfoundry/staticfile-buildpack/issues/87 that added the configuration for the other types of font, but not for otf files.

I wanted to check and push a pull request but I can't make out how the mime.types file is generated/retrieved.

arnaudruffin avatar Feb 28 '23 10:02 arnaudruffin

I don't see otf in the default https://github.com/nginx/nginx/blob/master/conf/mime.types Are you able to use the nginx-buildpack for this purpose? I'm not very familiar with otf to say it should be included in the staticfile buildpack

arjun024 avatar Mar 10 '23 16:03 arjun024

@ryanmoran @johnnyr0x thoughts?

arjun024 avatar Mar 10 '23 16:03 arjun024

I'm closing this issue under the premise that this is a usecase for nginx buildpack and not staticfile buildpack. Please feel free to reopen the issue for any further conversation

arjun024 avatar Mar 16 '23 14:03 arjun024

@arnaudruffin we would happily accept a PR. You can find the mimetypes list here: https://github.com/cloudfoundry/staticfile-buildpack/blob/610e933162c9d9154ab2b9f07472dbf116afe035/src/staticfile/finalize/data.go#L164

ryanmoran avatar Mar 17 '23 16:03 ryanmoran

@arnaudruffin I believe that this was resolved with #358. Is that correct?

ForestEckhardt avatar May 04 '23 14:05 ForestEckhardt