WEBrick and swf files

E

eching

Hi, I am having trouble getting Mozilla firefox to load a swf file
served from WEBrick. When I access the same file from another web
server in firefox, it works fine (apache, abyss, etc)

When I access the file from Internet Explorer 6 (served from WEBrick),
the swf file loads fine. When I try from firefox, I am asked if I want
to download the file.

Here is what WEBrick logs when it serves the file:

localhost - - [21/Dec/2006:10:11:22 CST] "GET /hello.lzx.swf HTTP/1.1"
304 0

I checked in firefox options and it has swf files listed to be opened
with shockwave flash. I also added "swf" =>
"application/x-shockwave-flash" as a mime type in webrick (added to
httputils.rb)

I am a bit green at these finer points of HTTP so if anyone has a
suggestion or possible solution, I'd greatly appreciate it, as I'd hate
to have to use Internet explorer for this particular app. I'd also
like to use WEBrick to serve the application.

Thanks in advance,
Eric
 
R

Rimantas Liubertas

When I access the file from Internet Explorer 6 (served from WEBrick),
the swf file loads fine. When I try from firefox, I am asked if I want
to download the file.

Here is what WEBrick logs when it serves the file:

localhost - - [21/Dec/2006:10:11:22 CST] "GET /hello.lzx.swf HTTP/1.1"
304 0

Status code 304 "Not modified" means that server has the same version
of the file
as browser in it's cache. So in this case file won't be served and
browser will use
cached version.
I checked in firefox options and it has swf files listed to be opened
with shockwave flash. I also added "swf" =>
"application/x-shockwave-flash" as a mime type in webrick (added to
httputils.rb)

It would help to see full set of headers (you can use LiveHTTPHeaders
or Firebug extesnions for that), but I have a wild idea: can you try
to rename your swf from
hello.lzx.swf to, say hello-lzx.swf maybe something along the path thinks that
lzx is extension of the file, not .swf....


Regards,
Rimantas
 
E

eching

It would help to see full set of headers (you can use LiveHTTPHeaders
or Firebug extesnions for that), but I have a wild idea: can you try
to rename your swf from
hello.lzx.swf to, say hello-lzx.swf maybe something along the path thinks that
lzx is extension of the file, not .swf....

Renaming the file worked. I also cleared the browser's cache and the
original file name works as well.

Thanks for the response.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top