August 3rd, 2024

NetNewsWire and Conditional Get Issues

Brent Simmons addresses bugs in NetNewsWire's conditional GET support, revealing issues with feed data processing. He suggests improved logic for updates and stresses the need for further testing to ensure reliability.

Read original articleLink Icon
NetNewsWire and Conditional Get Issues

Brent Simmons discusses issues with NetNewsWire's conditional GET support, revealing unexpected bugs in its functionality. Initially believing the feature to be reliable, Simmons expresses gratitude for Rachel's testing efforts, which highlighted these problems. The report details that the tests were conducted on a specific feed from a personal laptop, with some anomalies due to development activities. The core of the issue lies in how NetNewsWire processes feed data. When a feed download completes, the application checks the hash of the raw feed data against the previous hash. If they match, it assumes the feed hasn't changed and skips further processing, which can lead to missed updates in the Last-Modified and Etag headers. This oversight occurs because the application does not check for header changes if the raw data appears unchanged. Simmons theorizes that while this assumption may hold true in many cases, it fails in specific scenarios, leading to the identified bug. He proposes a revised logic that ensures the conditional GET information is updated regardless of whether the raw feed data has changed. While confident in this theory, Simmons acknowledges the possibility of other bugs and emphasizes the need for further investigation and testing to ensure the reliability of NetNewsWire's functionality moving forward.

Link Icon 1 comments
By @jshier - 6 months
Odd. It's not mentioned but URLSession should handle this automatically when downloading the same resource.