You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My env is window7 x64 &python2.7
I only want to build my webapp with web.py . but i don't want use apache or nginx .
Then the content-type is "application/x-css" in response header when i request a css file .
It worked on ie8 but not on chrome-45 and firefox-43 .
So i change this code of httpserver.py in the 216 line(class StaticApp, func send_header , the 1 line):
--code like this--
self.headers.append((name, value)) ---> self.headers.append((name, "application/octet-stream"))
-- end --
So, Anybody can tell me why it worked.? Does it mean we can set the content-type also is "application/octet-stream"? and let the browser does other thing like parse file content-type ?
thanks
The text was updated successfully, but these errors were encountered:
myfalut,
--code like this--
self.headers.append((name, value)) --->
if name == "content-type":
self.headers.append((name, "application/octet-stream" if value=="application/x-css" else value))
else:
self.headers.append((name, value))
-- end --
My env is window7 x64 &python2.7
I only want to build my webapp with web.py . but i don't want use apache or nginx .
Then the content-type is "application/x-css" in response header when i request a css file .
It worked on ie8 but not on chrome-45 and firefox-43 .
So i change this code of httpserver.py in the 216 line(class StaticApp, func send_header , the 1 line):
--code like this--
self.headers.append((name, value)) ---> self.headers.append((name, "application/octet-stream"))
-- end --
So, Anybody can tell me why it worked.? Does it mean we can set the content-type also is "application/octet-stream"? and let the browser does other thing like parse file content-type ?
thanks
The text was updated successfully, but these errors were encountered: