seancoady
Jan-15-2007, 11:48 PM
Hi,
I'm trying to retrieve Smugmug's Popular Photo RSS feed from within a client application and noticing some strange results. It's returning HTML instead of RSS XML:
This can be easily seen by fetching the feed with a wget on the Unix command line:
wget "http://www.smugmug.com/hack/feed.mg\?Type=popular\&Data=today\&format=rss200"
(note the '?' and '&' characters are backslash-escaped to avoid being interpreted by the Unix shell)
What comes back is HTML of a generic page on Smugmug. Here are the first few lines that come back:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
****** http-equiv="content-type" content="text/html; charset=iso-8859-1" />
****** name="description" content="The ultimate in photo sharing. Easily create online photo albums. Share, store, organize and print." />
...
(and later in the document)
<body onload=" smugLoad();" class="loggedIn pureSmugCSS bodyColor_Black">
<div id="bodyWrapper">
<!-- These extra divs/spans may be used as catch-alls to add extra imagery. -->
<div id="extraDiv1"><span></span></div><div id="extraDiv2"><span></span></div><div id="extraDiv3"><span></span></div>
...
As you can see, there's nothing RSS-like about the response. It's an HTML page.
What's strange is that it does show up correctly if I insert the URL (http://www.smugmug.com/hack/feed.mg?Type=popular&Data=today&format=rss200) in a browser. Firefox renders the response as RSS XML. Any idea why Firefox is seeing it differently?
Confused....
:scratch
I'm trying to retrieve Smugmug's Popular Photo RSS feed from within a client application and noticing some strange results. It's returning HTML instead of RSS XML:
This can be easily seen by fetching the feed with a wget on the Unix command line:
wget "http://www.smugmug.com/hack/feed.mg\?Type=popular\&Data=today\&format=rss200"
(note the '?' and '&' characters are backslash-escaped to avoid being interpreted by the Unix shell)
What comes back is HTML of a generic page on Smugmug. Here are the first few lines that come back:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
****** http-equiv="content-type" content="text/html; charset=iso-8859-1" />
****** name="description" content="The ultimate in photo sharing. Easily create online photo albums. Share, store, organize and print." />
...
(and later in the document)
<body onload=" smugLoad();" class="loggedIn pureSmugCSS bodyColor_Black">
<div id="bodyWrapper">
<!-- These extra divs/spans may be used as catch-alls to add extra imagery. -->
<div id="extraDiv1"><span></span></div><div id="extraDiv2"><span></span></div><div id="extraDiv3"><span></span></div>
...
As you can see, there's nothing RSS-like about the response. It's an HTML page.
What's strange is that it does show up correctly if I insert the URL (http://www.smugmug.com/hack/feed.mg?Type=popular&Data=today&format=rss200) in a browser. Firefox renders the response as RSS XML. Any idea why Firefox is seeing it differently?
Confused....
:scratch