Martin Atkins (mart) wrote in fotobilder,
Martin Atkins

A Stupid Patch, a Question, and a Comment.

It's small, so it can just go directly into this post. heh.

--- fotobilder/src/fotoup.plMon Jul 15 19:58:54 2002
+++ fotobilder/src/fotoup.plThu Jul 18 17:16:02 2002
@@ -78,6 +78,7 @@
     my $img;
     open (F, $file);
+    binmode(F);
     { local $/ = undef;
       $img = <F>; }
     close F;
@@ -107,7 +109,8 @@
         print $res->content;
         $chal = $res->header("X-FB-NewChallenge");
     } else {
-        print $res->error_as_HTML();
+        my $error = ($res->content() || $res->error_as_HTML());
+        print $error;

Now, PicPix doesn't seem to like any of my JPEGs. I checked and they do indeed start with 0xFF 0xD8 as the fmtid_from_magic function expects, and with my above modification to fotoup I can see that it is the format that the server is complaining about. One strange thing, however, is that I'm getting back a server error saying "Unknown Format" when the code suggests it should be a "Bad Request" response instead.

I was trying to get FotoBilder running on my Windows 2000 box, both out of interest and because it'd make things easier for me. However, I found that ActiveState's DBI package is madly old and I'm guessing this is why it doesn't appear to have selectrow_hashref. Since I don't have the relevant tools to build a new version of DBI for Win32, I've given up on this for now.

Update: Problem solved. It was the binary/non-binary distinction which exists in Windows perl that did it. My patch above fixes that, but I stupidly wasn't using my modified version. It's still strange, because the magic string (which it does format comparison on) was unchanged.


  • 302: lj_dev

    In the interests of consolidating all FotoBilder development-related discussion, we're going to be closing down this community. The same…

  • Development stalled?

    Is the development of Fotobilder held? Stalled? I am asking because there is no activity on the community and there is no link to the Fotobilder…

  • (no subject)

    Does FotoBilder works with Apache2? I installed all the required modules on my debian sarge, and when I restart my apache server, it dies horribly…

  • Post a new comment


    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic