Brad Whitaker (whitaker) wrote in lj_dev,
Brad Whitaker
whitaker
lj_dev

Weblogs.com Craziness

Some of you may remember a few months ago when we implemented support for pinging Weblogs.com. It worked briefly at first, then stopped working shortly after. A bit puzzling.

After work today (heh) I got bored and decided to fix it. After verifying that our pinging code was fine, bradfitz and I found that qbufferd had been stopped for a couple of weeks. After some enhancements, it flushed its existing buffer and was pinging Weblogs.com, but with no results.

We couldn't figure out why Weblogs.com kept giving us an error message saying that the journal had not been modified. After a lot of searching through message boards and scrutinizing vague "specs" courtesy Dave Winer and Userland, I finally came across holy grail:

"...I used the same method as Weblogs.com - if a page has changed size by at least 50 characters then flag it up..."

*sigh* I guess they've never heard of MD5? So we quickly hacked up a solution to take: (last_post_time % 50) * 50 and return that many 'x' characters after the modtime. That will work fine most of the time. To be safe, we also return a sane last-modified header.

Along the way, we also found that Weblogs.com hits our servers twice after we send it a ping. We verified this in our logs, but.. why?

The good news is that the Weblogs pinging works and as a side effect, the latest (and latest-rss) pages are working again.
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 8 comments