The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Saturday, April 26, 2014

Just because there's a standard doesn't mean it's consistent

I came across this URL today that has some base64 encoded data in it. Curious as to what it might be, I tossed the data into a base64 decoder only to have it reject the data as bad.

Okay. It certainly looks like base64 encoded data. But the data doesn't match the RFC-2045 specification. Don't tell me there's more than one … oh for heaven's sake! Really? Thirteen variations?

Standards! There are so many to choose from!


An unexpected feature

As I was writing the link to RFC-2045 in the previous post, an idea suddenly struck me—why should I have to type out the entire URL? I already have a shortcut to link to Amazon (all I have to do is write a link like <a href="asin:B00BWQW73E"> and mod_blog converts it to <a class="book" href="http://www.amazon.com/exec/obidos/ASIN/B00BWQW73E/conmanlaborat-20">) so it shouldn't be that hard to add.

I was fully expecting it to take maybe fifteen minutes or so to add the code, but to my surprise, no code change was required! The configuration file has this bit:

affiliate =
{
  {
    proto = "asin",
    link  = "http://www.amazon.com/exec/obidos/ASIN/%s/conmanlaborat-20"
  }
}

It was originally intended for affiliate links, but it'll work for this as well. A slight modification:

affiliate =
{
  {
    proto = "asin",
    link  = "http://www.amazon.com/exec/obidos/ASIN/%s/conmanlaborat-20"
  },
  {
    proto = "rfc",
    link  = "http://www.ietf.org/rfc/rfc%s.txt"
  },
}

Now all I have to do is write <a href="rfc:2045"> and mod_blog will convert it to <a href="http://www.ietf.org/rfc/rfc2045.txt">. I love it when stuff like this happens.


Beware typosquatting

When I initially added the links to the IETF RFC database I made a typo. Instead of linking to “I-E-T-F dot O-R-G” I instead typed it as “I-E-F-T dot O-R-G” and … wow. Easily a dozen redirects, probably half a dozen attempts to infect my computer and landing on some company website I never heard of hawking seminars to help you pass Cisco training and certificaitons.

Shudder.

Obligatory Picture

[Don't hate me for my sock monkey headphones.]

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: http://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

http://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2014 by Sean Conner. All Rights Reserved.

Listed on BlogShares