Hello Frederick,

Here's how I've tested

Ruby 1.8.7 (2008-08-11 patchlevel 72) [powerpc-darwin9.6.0]
Rails 2.3.2
Webrick
Thin 1.0.0
Mongrel 1.1.5
rmagick 2.9.1
ImageMagick 6.5.1
attachment_fu - current version
paperclip - current version

and

Ruby 1.9.2dev (2009-04-25 trunk 23281) [powerpc-darwin9.6.0]
Rails 2.3.2
Webrick
Thin 1.0.0
rmagick 2.9.1
ImageMagick 6.5.1
attachment_fu - current version
paperclip - current version

In all cases I'm running in the development environment on a single
machine - OSX 10.5.6 ppc.

So as near as I can tell, when I browse my Rails app at localhost:3000
the data path is, with the exception of the *magick and browser, all
in the RoR world.  I'm really not clear how the whole Ruby/Rails/Rack/
[Thin, Webrick, Mongrel] thing hangs together so I can't get any
closer to whose problem it is, really.

I'm particularly troubled by the following:

1) attachment_fu and paperclip have no problem identifying both .jpg
and .JPG as image/jpeg content_type and this information is stored in
the database.

2) the Unix file command, looking at the files magic numbers,
correctly identify both files as the same type - JPEG EXIF 2.2.

3) The "from" end image in the view's link_to displays correctly.  In
fact, I've checked this by using the full image at the from end
pointing at itself on the to end.

4) Somewhere between the "click the link" and the "display the image"
code is looking at the file name extension and assigning the
content_type (incorrectly) based on case.

rick

On Apr 29, 11:55 am, Frederick Cheung <frederick.che...@gmail.com>
wrote:
> On Apr 29, 8:52 pm, Rick <richard.t.ll...@gmail.com> wrote:
> \> NOTE: the content_type associated with .jpg is image/jpeg
>
> > NOTE: the content_type associated with .JPG is text/plain
>
> > This difference causes Firefox to identify all .JPG files as "JPEG
> > Picture" rather than "image/jpeg...", resulting in different behavior
> > in the browser when the "link_to" link is followed.
>
> > Where should I take this problem?
>
> Well if it is a rails problem, I'd post to the rails core list. Are
> you sure it is though? who serves up that image (ie does the request
> for bla/.../foo.JPG go through rails at all ? if it doesn't it can
> hardly be rails' fault). You may find that it is actually thin mis-
> reporting the content-type (and i'm pretty sure there's no way it
> checks in the database to see what the content_type of the file is).
>
> Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to