Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help on how to handle feed://



Mike Zornek wrote:

So I have a spider program that will traverse a website and in a GUI have a
list of all the "resources" it's found. On occasion the spider is going to
run into links that use the feed:// protocol and I'm trying to figure out
how to handle it best.

feed:// isn't a transfer protocol; it's a pseudo-MIME type. See the draft standard:


"If the "feed" URI string begins with the string 'feed://' then it MUST be followed by an authority with optional path and query string with the scheme for the URI for accessing the data feed being inferred as the "http" scheme."

So if it starts with feed://, you should change that to http:// before actually retrieving the file, but it could also start with feed:http://, in which case you should just remove the feed:.

If I find a href using the feed protocol, should I rewrite it as a http
protocol, or store it as the original feed protocol and then add a special
hook in the connection methods to rewrite it as http just before sending out
the request (to make sure it returns a Status Code 200 (OK)?

When to do the conversion really depends on what you are doing with the URIs.  If you're only using them to test status, there's no reason to keep the feed://, but if you're separating the URIs by type at all, the feed:// might be your only indication that the file is XML and not HTML or readable text, which is why the scheme was established.

Peace,
Scott
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Web-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/web-dev/email@hidden

This email sent to email@hidden

References: 
 >Need help on how to handle feed:// (From: Mike Zornek <email@hidden>)



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.