logo       

Newline problem: msg#00029

lang.ruby.camping.general

Subject: Newline problem

Hello all,

Recently I have started writing some small package apps. The main app
I'm working on at the moment is Camping/Photos[1]. Here I use
a controller to serve static files (Theme[3]) that I have copied from [2].
There seems a problem however, when using this via lighttpd. All files
that get served (via photos-dispatch.rb) get an extra '\r\n' in front.
This means that PNG and JPEG files break. I tried serving an empty file
(0B) and got served a file of 2 bytes containing '\r\n'. Since I use
the X-Sendfile header I kind of assumed it is in the hands of lighttp.
However, I have had this working and the only things I have changed are
in the app and not in lighttpd, maybe there are some subtleties I am
missing. Can anyone help me finding the bug?

Kind regards,
Paul

1: https://trac.luon.net/camping-photos/
2: http://code.whytheluckystiff.net/camping/wiki/ServingStaticFiles
3: https://trac.luon.net/camping-photos/file/trunk/photos/controllers.rb

--
Student @ Eindhoven | email:
paul-FGvqe4uplSY@xxxxxxxxxxxxxxxx
University of Technology, The Netherlands | JID:
paul-FGvqe4uplSY@xxxxxxxxxxxxxxxx
>>> Using the Power of Debian GNU/Linux <<< | GnuPG key ID: 0x50064181


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise