Patching Aggie's referrer

Freshness Warning
This article is over 15 years old. It's possible that the information you read below isn't current.

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...


Your comments:

Text only, no HTML. URLs will automatically be converted to links. Your email address is required, but it will not be displayed on the site.

Name:

Not your company or your SEO link. Comments without a real name will be deleted as spam.

Email: (not displayed)

If you don't feel comfortable giving me your real email address, don't expect me to feel comfortable publishing your comment.

Website (optional):

Follow me on Twitter

Best Of

  • California State Fair The California State Fair lets you buy tickets in advance from their Web site. That's good. But the site is a horror house of usability problems.
  • Best of Newly Digital There have been dozens of Newly Digital entries from all over the world. Here are some of the best.
  • How not to apply for a job Applying for a job isn't that hard, but it does take some minimal effort and common sense.
  • Newly Digital Newly Digital is an experimental writing project. I've asked 11 people to write about their early experiences with computing technology and post their essays on their weblogs. So go read, enjoy, and then contribute. This collection is open to you. Write up your own story, and then let the world know about it.
  • Lock-in is bad T-Mobile thinks they'll get new Hotspot customers with exclusive content and locked-in devices.
  • More of the best »

Recently Read

Get More

Subscribe | Archives

Recently

Encouraging 1:1s from other managers in your organization (Jan 4)
If you’re managing other managers, encourage them to hold their own 1:1s. It’s such an important tool for managing and leading that everyone needs to be holding them.
One on One Meetings - a collection of posts about 1:1s (Jan 2)
A collection of all my writing on 1:1s
Are 1:1s confidential? (Jan 2)
Is the discussion that occurs in a 1:1 confidential, even if no agreed in the meeting to keep it so?
Skip-level 1:1s are your hidden superpower (Jan 1)
Holding 1:1s with peers and with people far below you on the reporting chain will open your eyes up to what’s really going on in your business.
Do you need a 1:1 if you’re regularly communicating with your team? (Dec 28)
You’re simply not having deep meaningful conversation about the process of work in hallway conversations or in your chat apps.
What agenda items should a manager bring to a 1:1? (Dec 23)
At least 80% of a 1:1 agenda should be driven by your report, but if you also to use this time to work on things with them, then you’ll have better meetings.
Handling “I don’t have anything to talk about” in your 1:1s (Dec 21)
When someone says they have nothing to discuss, they’re almost always thinking too narrowly.
What should you talk about in a 1:1? (Dec 19)
Who sets the agenda? What should you discuss, and what should you avoid discussing?

Subscribe to this site's feed.

Contact

Adam Kalsey

Mobile: 916.600.2497

Email: adam AT kalsey.com

Twitter, etc: akalsey

Resume

PGP Key

©1999-2019 Adam Kalsey.