Review Board integration broken (needs 404 on File Not Found in Revision instead of 200)

Issue #808 resolved
Dan LaMotte created an issue

I realize there is no direct integration with Review Board in Rhode Code, however, Review Board attempts to access Rhode Code by getting the "raw" file out of the repository given revision and a path to a file.

The problem is that instead of returning 404 when a specific file doesnt exist in a specific revision, it redirects to a page that returns 200 and adds a "message" into the page that says the file does not exist in that revision. Review Board has no way of knowing based on the status that this is happening because it's client simply redirects and returns the response to the page with the 200. So, Review Board simply stores the "successful" request in the cache and attempts to apply the diff against the HTML of the page (rather than the content of the file it was attempting to retrieve).

My hope is that you can somehow change the response of a "file not found in revision" to return 404 and NOT a redirect to a page with status 200. I suppose a redirect is fine as long as the final request in the chain ends up with a 404.

I think this would apply to any client using the Rhode Code API, Review Board is simply a single client experiencing this issue.

Comments (3)

  1. Marcin Kuzminski repo owner

    We also had recent discussion about that and we feel 404 is more correct, i started those changed already in beta branch...

  2. Log in to comment