Keyvan Nayyeri

God breathing through me

RFC2396 URL 1.0 Beta 1 Released

A few weeks ago, I announced a new open source project for RFC2396 URLs which is a part of our implementation for Google Safe Browsing API in Subkismet.

Today I'm happy to announce the first public Beta release of this component.  Happy because I never thought that I can release this sooner than 3-4 months!

This first release contains everything necessary for our Subkismet project.  For now, it only supports canonicalization of URLs based on RFC2396 specification with an exception: it doesn't normalize IP based URLs.

But it supports all other steps to canonicalize a URL based on Mozilla algorithm.  As you can guess, most the job was around regular expressions and string manipulations.  Unit testing helped me a lot on writing this component.

Here is an example of using this component:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using RFC2396;

 

namespace TestRFC2396

{

    class Program

    {

        static void Main(string[] args)

        {

            Console.Title = "Test RFC2396 URL 1.0 Beta 1";

 

            string url = "http://One.2.nayyeri$.net/1/gholi/./3/test/keyvan/../nayyeri.html#something";

            RFC2396Url RfcUrl = new RFC2396Url(url);

 

            Console.WriteLine(RfcUrl.Canonicalize());

 

            Console.ReadLine();

        }

    }

}

And this is the output:

Output

Now that we have a class for performing lookups and necessary code to canonicalize URLs, we have an easy way ahead to implement Google Safe Browsing API in Subkismet.

For this project, I will try to add new features and improve the component whenever I could get off from other projects.

You can download binary or source code of RFC2396 URL Beta 1 from CodePlex.  I appreciate any feedback.

1 Comments

RFC2396 URL 1.0 Released
May 16, 2008 1:53 PM
#

Back in July 2007 and as a requirement for my implementation of Google Safe Browsing API in Subkismet

Leave a Comment





Ads Powered by Lake Quincy Media Network