allow favicon.png

This commit is contained in:
Martijn Voncken 2008-10-27 00:26:01 +00:00
parent 0b09c6563c
commit 0f94cf2316
2 changed files with 6 additions and 3 deletions

View File

@ -38,7 +38,7 @@ import pkg_resources
import deluge.component as component import deluge.component as component
import deluge.common import deluge.common
from deluge.tracker_icons import TrackerIcons from deluge.ui.tracker_icons import TrackerIcons
from deluge.log import LOG as log from deluge.log import LOG as log
from deluge.ui.client import aclient from deluge.ui.client import aclient
from deluge.configmanager import ConfigManager from deluge.configmanager import ConfigManager

View File

@ -51,7 +51,7 @@ import os
from deluge import component from deluge import component
from deluge.ui.client import sclient as proxy from deluge.ui.client import sclient as proxy
from deluge.configmanager import ConfigManager from deluge.configmanager import ConfigManager
from deluge.tracker_icons import TrackerIcons from deluge.ui.tracker_icons import TrackerIcons
page_manager = component.get("PageManager") page_manager = component.get("PageManager")
config = ConfigManager("webui06.conf") config = ConfigManager("webui06.conf")
@ -456,7 +456,10 @@ class tracker_icon:
if filename: if filename:
log.debug("file-name=%s" % name) log.debug("file-name=%s" % name)
web.header("Cache-Control" , "public, must-revalidate, max-age=86400") web.header("Cache-Control" , "public, must-revalidate, max-age=86400")
web.header("Content-Type", "image/x-icon") if filename.endswith(".ico"):
web.header("Content-Type", "image/x-icon")
elif filename.endswith(".png"):
web.header("Content-Type", "image/png")
data = open(filename, "rb").read() data = open(filename, "rb").read()
print data print data
else: else: