-
- Downloads
[FIX] web: _serve_attachment should not trigger redirect loops
When the Bundle mechanism caches bundle files into the ir.attachment table, it can sometimes cache an empty resource file (For example, if a less/saas compiled file results in an empty CSS file) for the bundle URL. The appropriate behavior for _serve_attachment() when the browser loads that bundle URL is to return an empty file (which is the correct content), instead of redirecting again to the same URL, triggering a loop. In addition, this commit removes the special case for returning 204 No Content. This HTTP status code is not really meant for GET requests - returning an empty file with a 304 or 200 code is more appropriate and allows for normal browser caching.
Please register or sign in to comment