Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Use GUPnP Mime Type if available #120

Closed
markdryan opened this issue Sep 12, 2013 · 2 comments
Closed

Use GUPnP Mime Type if available #120

markdryan opened this issue Sep 12, 2013 · 2 comments
Labels

Comments

@markdryan
Copy link
Contributor

When dLeyna-renderer hosts a file, it first asks GLib to determine the mime type of the file. This mime type is then used to set the Content Type header in responses to HTTP get requests. dLeyna-renderer also uses gupnp-dlna to compute the DLNA profile of the file being hosted. However, there is a potential problem here as there could be a mismatch between the DLNA profile computed by gupnp-dlna and the mime type computed by glib, particularly if the shared-mime-info database is not available on the target platform. Therefore, it would be better if dLeyna-renderer used the mime type reported by GUPnP-DLNA when available. If not available it could fall back to g_content_type_guess. This will ensure that our mime types and dlna profiles are always in sync and that dLeyna-renderer can provide a mime type even if the shared mime type database is not installed on a device.

@ghost ghost assigned cguiraud Sep 12, 2013
@markdryan
Copy link
Contributor Author

Christophe, since you're working on dLeyna-renderer at the moment, could you take a look at this?

cguiraud added a commit to cguiraud/dleyna-renderer that referenced this issue Sep 12, 2013
when hosting a file, we now use the mime type reported by GUPnP-DLNA
when available, and we fallback to the g_content_type_guess one if it
is not available.

Fix issue intel#120
intel#120

Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
cguiraud added a commit to cguiraud/dleyna-renderer that referenced this issue Sep 13, 2013
when hosting a file, we now use the mime type reported by GUPnP-DLNA
when available, and we fallback to the g_content_type_guess one if it
is not available.

Fix issue intel#120
intel#120

Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
cguiraud added a commit to cguiraud/dleyna-renderer that referenced this issue Sep 13, 2013
when hosting a file, we now use the mime type reported by GUPnP-DLNA
when available, and we fallback to the g_content_type_guess one if it
is not available.

Fix issue intel#120
intel#120

Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
cguiraud added a commit to cguiraud/dleyna-renderer that referenced this issue Sep 13, 2013
when hosting a file, we now use the mime type reported by GUPnP-DLNA
when available, and we fallback to the g_content_type_guess one if it
is not available.

Fix issue intel#120
intel#120

Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
cguiraud added a commit to cguiraud/dleyna-renderer that referenced this issue Sep 13, 2013
when hosting a file, we now use the mime type reported by GUPnP-DLNA
when available, and we fallback to the g_content_type_guess one if it
is not available.

Fix issue intel#120
intel#120

Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
@markdryan
Copy link
Contributor Author

Fixed by PR #128

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants