Hey all,
I have a little news display on my system that gets an RSS feed from Google and displays it in the client. The code uses system.net.httpGet() to get the rss feed and parse it out. For a long time the news feed would never change and I didn’t have any time to look into it. Today I finally spent some time and looked into it.
From my testing I have found that somehow, I have no idea how, the system.net.httpGet() function is caching data somewhere from months ago. If I run it in the script console the printed data is different than if I would type in the same URL in my browser. The data returned from system.net.httpGet() is several months old.
However, if I put a different URL in the function then it would return correctly until I put the original RSS feed URL back in there. It seems like the function is caching on specific URLs! Not sure if this was an attempt to speed up the function or what but it’s causing issues.
For now I have switched the function to the Python equivalent:
response = urllib2.urlopen(url).read().encode("ascii", "ignore")
That seems to work without issue. FYI for anyone else using the system.net.httpGet() function and has that issue.