Re: Sherlock's User-Agent header
Subject : Re: Sherlock's User-Agent header
From: Jussi-Pekka Mantere <email@hidden >
Date: Thu, 26 Dec 2002 20:57:13 -0800
On Friday, December 13, 2002, at 11:39 AM, Jeff Adams wrote:
I noticed that it seems Sherlock's http requests use a User-Agent
header of:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)
If you do decide to roll your own User-Agent, perhaps the following
format would work:
let $headers := dictionary (
("User-Agent", "Mozilla/5.0 (Macintosh; PPC Mac OS X;
en-US) Sherlock/com.MyCompany.Search")
)
For example, Chimera (20021220 build) identifies as:
HTTP_USER_AGENT 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O;
en-US; rv:1.0.1) Gecko/20021220 Chimera/0.6+'
Notice the use of Product Tokens to add finer granularity.
Whatever you do end up choosing, make sure the User-Agent conforms to
the spec:
http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc2616.html#sec-14.43
An example of a malformed UA string:
'Mac OS X; WebServices.framework (0.1d1)'
Depending on your choice of the UA, you may (rarely) end up receiving
different content from sites. For added emphasis, you may want to
include an "Accept" header in your requests, too:
("Accept",
"text/xml,application/xml,application/xhtml+xml,text/html;q=0.5")
Cheers,
Jussi-Pekka
_______________________________________________
sherlock-channel-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/sherlock-channel-development
Do not post admin requests to the list. They will be ignored.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.