Need someone to lead product management at your software company? I create software for people that create software and I'm looking for my next opportunity. Check out my resume and get in touch.

Patching Aggie's referrer

Freshness Warning
This blog post is over 20 years old. It's possible that the information you read below isn't current and the links no longer work.

Inspired by Les Orchard’s patching of AmphetaDesk to fix the referrer problem, I’ve patched Aggie.

This patch will change Aggie’s behavior to conform to the HTTP specs. When Aggie requests an RSS feed, the referrer header is now blank, and if the user configured a WeblogURL in Aggie.xfg, that URL will be added to the User-Agent header.

The only changes are a few lines in AggieRequest, but I’m including the entire AggieRequest class here for convenience.

public  class AggieRequest {
   private const int defaultTimeout_ = 60000;
   private const string aggieBase_ = @"http://bitworking.org/AggieReferrers.html";
   private static string referer_ = "";
   private static string userAgent_ = VersionInfo.UserAgent
      + " (" + Environment.OSVersion.ToString() + "; .NET CLR " 
      + Environment.Version.ToString();
   
   public static string WeblogUrl {
      set { 
         if (null != value && String.Empty != value) {
            userAgent_ = "; From: userAgent_ + value + ")"; 
         } else {
            userAgent_ = userAgent_ + ")"; 
         }
      }
   }
   
   public static HttpWebRequest CreateRequest(string url) {
      WebRequest req = WebRequest.Create(url);
      HttpWebRequest wreq = req as HttpWebRequest;
      if (null != wreq) {
         wreq.UserAgent = userAgent_;
         wreq.Referer =  referer_;
         wreq.Timeout = defaultTimeout_;
      }
      return wreq;
   }         
}

This patch is released under the same licensing terms as Aggie itself, which if I remember correctly is the MIT License.

I’ve compiled Aggie 1.0 RC4 with this patch using SharpDevelop and it works for me. No guarantees are made that it will work for you, although I can’t think of any reason why it wouldn’t.

Adam Kalsey
February 4, 2003 8:54 AM

Aggie's developer writes in: "I have moved the referrer URL to be appended to the UserAgent field instead of the Refererrer field. This change is currently in CVS and will be in RC5 when it is released." Excellent.

Trackback from Mentalized
March 19, 2003 8:19 AM

Bogus referrers

Excerpt: My referrerlogs are being polluted. Popdex, Organica, Technorati and others seem to not care about the HTTP specification and are...

This discussion has been closed.

Recently Written

The Dark Side of Input Metrics (Nov 27)
Using input metrics in the wrong way can cause unexpected behaviors, stifled creativity, and micromanagement.
Reframe How You Think About Users of your Internal Platform (Nov 13)
Changing from "Customers" to "Partners" will give you a better perspective on internal product development.
Measuring Feature success (Oct 17)
You're building features to solve problems. If you don't know what success looks like, how did you decide on that feature at all?
How I use OKRs (Oct 13)
A description of how I use OKRs to guide a team, written so I can send to future teams.
Build the whole product (Oct 6)
Your code is only part of the product
Input metrics lead to outcomes (Sep 1)
An easy to understand example of using input metrics to track progress toward an outcome.
Lagging Outcomes (Aug 22)
Long-term things often end up off a team's goals because they can't see how to define measurable outcomes for them. Here's how to solve that.
Tyranny of Outcomes (Aug 19)
An extreme focus on outcomes can have an undesired effect on product teams.

Older...

What I'm Reading

Contact

Adam Kalsey

+1 916 600 2497

Resume

Public Key

© 1999-2023 Adam Kalsey.