@@ -104,11 +104,15 @@ getItem userdata f =
104 if isAbsoluteURI f
104 if isAbsoluteURI f
105 then openURL f
105 then openURL f
107+ -- strip off trailing query or fragment part, if relative URL.
108+ -- this is needed for things like cmunrm.eot?#iefix,
109+ -- which is used to get old versions of IE to work with web fonts.
110+ let f' = takeWhile (\c -> c /= '?' && c /= '#') f
107− let mime = case takeExtension f of
111+ let mime = case takeExtension f' of
108− ".gz" -> getMimeType $ dropExtension f
112+ ".gz" -> getMimeType $ dropExtension f'
109 x -> getMimeType x
113 x -> getMimeType x
110− exists <- doesFileExist f
114+ exists <- doesFileExist f'
111− cont <- if exists then B.readFile f else readDataFile userdata f
115+ cont <- if exists then B.readFile f' else readDataFile userdata f'
112 return (cont, mime)
116 return (cont, mime)
114getRaw :: Maybe FilePath -> String -> String -> IO (ByteString, String)
118getRaw :: Maybe FilePath -> String -> String -> IO (ByteString, String)