Fixing Linking Typos Automatically

I’ve been noticing a set of 404 (not found) errors showing up in the Cligs reports: People were requesting cligs but instead of forwarding them on, the Cligs system was saying it can’t find the clig in question, and so it returns an error. This was happening mostly from Plurk referrals, but also the odd Twitter one too.

Digging in deeper, the problem became obvious. When someone shares a link in Plurk, they have a bug that detects the actual link the wrong way. Take the following two example plurks:

"…hey check this out http://cli.gs/abc123"

"..hey my site (http://cli.gs/abc123) is cool…"

What happens (and this is the bug) is that in the first case, the link is detected to be http://cli.gs/abc123 while in the second case it is http://cli.gs/abc123). So in the second case, what the Cligs system gets asked about is not really the clig in question.

The Fix

Given this and other less common but similar 404 errors, I’ve just went live with a tweak that tries hard to compensate for this problem. Basically if you feed it something that vaguely looks like a clig but isn’t quite right, it tries to decipher if there is a real clig in the request. If it finds it, the Cligs system treats the request as it would normally.

Feedback on how this fix is working (or not) is most welcome at the usual place.

One Response to “Fixing Linking Typos Automatically”

  1. The Blog of Cligs - » Clig Forwarding and Punctuation (Again) Says:

    [...] happens when punctuation is used right next to a clig’s URL? Previously, I talked about a Cligs-specific workaround and gave the following example: "…hey check this out [...]

Leave a Reply