Drop in replacement for Snoopy

2007-05-18
2013-04-30
  • Arnold Daniels
    Arnold Daniels
    2007-05-18

    I’ve just finished a so called drop in replacement for the snoopy library. I was using magpieRSS but ran into a view problems.

    The first problem I had was that snoopy always got a time out when fetching content from a server with keep-alive enabled. It should look at the ‘Content-Length’ header, but it doesn’t. Second was that fetching data which was send chunked, header ‘Transfer-Encoding: Chunked’, didn’t arrive well at all. The sizes are send before each chunk, which made them end up in the result.

    The snoopy replacement uses Curl instead of the file handlers (fopen, fgets, etc). Basically all the functionality of snoopy is already in the curl extension, so I just had to write a wrapper for it. It should be a drop in replacement, but I’ve only tested it with magpie, so there might be some bugs still.

    You can find the lib on http://blog.adaniels.nl/?p=18