On Jan 26, 2008 9:41 AM, Thomas Dalton thomas.dalton@gmail.com wrote:
Note that edit pages and view pages possibly should be handled differently, or possibly not.
I can't see anything that edit pages could return other than 200 OK, the issue is with redlinks, since they don't actually link to what you would expect, the article (which doesn't exist and should return 404), they link to the edit page (which does exist, so should return 200). Could redlinks somehow return a 307 Temporary Redirect to the edit page, rather than linking there directly? The issue is determining when to redirect to the edit page and when to simply return a 404 - could the referer be used for that? If you've followed a link from the wiki, it should go to the edit page, if you've got there any other way (link from external site or typing in the url) you should get the 404. I'm not sure if treating a URL differently based on the referer would be against the standards.
Using referers isn't necessary. http://en.wikipedia.org/w/index.php?title=Gil_Prescott&action=edit is different from http://en.wikipedia.org/wiki/Gil_Prescot. Red links point to the former, which is clearly a 200 OK. A "link from external site or typing in the url" would presumably go to the latter.
I'm not sure that 404 is the correct response though. Wouldn't it be more correct for http://en.wikipedia.org/wiki/Gil_Prescot to return a temporary redirect to http://en.wikipedia.org/w/index.php?title=Gil_Prescott&action=edit?
The spec is really rather incomplete when it comes to dynamically generated pages. 200 OK isn't correct, but neither is 404 Not Found. What you'd really want is 2XX Dynamically Generated. 307 is technically correct, though.