Mongrel Socket read error on .pages (iWork) file

Hi,

I’m having a quite peculiar problem that hopefully someone can help me
with.

I use attachment_fu for image uploads, and found that uploads with
any .pages files don’t work. The error I’m getting for my development
server is:

Mon Feb 09 14:20:26 +1300 2009: Error reading HTTP body:
#<RuntimeError: Socket read return nil>
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
http_request.rb:105:in `read_socket’

(There’s more stack trace, but it seems to stem from there)

So the error is when mongrel tries to read the file, before it even
hits my application code. I’ve also tried running my development
server using thin, but again an error was thrown before even hitting
my application code (I assume that both are built on socket or
whatever is actually causing this error).

Has anyone else run into this, or does anyone know enough about the
code in the socket that’s being used here to help out?

I’m running
ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-darwin8.10.2]
and Rails 2.1.0

Jeremy -

On 8-Feb-09, at 8:34 PM, Jeremy Olliver wrote:

Mon Feb 09 14:20:26 +1300 2009: Error reading HTTP body:
#<RuntimeError: Socket read return nil>
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
http_request.rb:105:in `read_socket’

(There’s more stack trace, but it seems to stem from there)

I don’t have the answer, but maybe a hint. (not being coy, but hoping
this bit will help)

pages files are folders - you can right click and “show package
contents”.

I use redmine (issues management), and I cannot upload pages file to it.

So the format might be strange enough that it cannot be uploaded -
that the browser is confused.

Jodi

That’s a good point, and I agree is probably the reason why.
BTW if you do need to upload pages files, you can zip them first
(makes them a single file I guess) then upload them successfully

Thanks,
Jeremy