-
-
Notifications
You must be signed in to change notification settings - Fork 529
Incorrect HTTP code returned for a static resource #4430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
everettg_99 submitted: I agree with this -- MODx should do some checking as to whether the referenced file exists or not and the HTTP response code should be updated. Furthermore, the "file exists" check should occur also on the "on save" event -- that way the user would be alerted to problems sooner. This could also help identify problems with permissions (e.g. when the targeted file exists, but it not readable by PHP). |
dinocorn submitted: I might be experiencing this bug on 2.2.2 also. I'm not sure, maybe my server time or paths aren't correct but the content of the snippet loads fine, there's just a nasty warning I haven't figured out how to to silence. I'm getting a filemtime() when loading an uncached static snippet. Warning: filemtime() [function.filemtime]: stat failed for staticx/snippets/statcSnip.php in /home/jpdevrie/public_html/clients.devries.jp/core/model/modx/modscript.class.php on line 131 |
Eiventeleiron submitted: Attaching a diff with possible fix. Please review and possibly merge! Also inside this pull request: #380 |
Eiventeleiron submitted: New pull request: #382 |
Merge remote-tracking branch 'Evengard/rel22bug4430' into bug-4430 * Evengard/rel22bug4430: Possible fix for bug [modxcms#4430]
Merge branch 'release-2.2' * release-2.2: (130 commits) Bump version for 2.2.5-pl [modxcms#8753] fixing that trivial variable error. French translation update [modxcms#8196] Changed event type for fieldChangeEvent for combo boxes [modxcms#8186] Adding FC rules checking based on reloadData. [modxcms#8790] adding a possibility to hide the new password after changing via profile reset. [modxcms#7631] add changelog entry Fix duplicate beforeSave() in modProcessorObjectCreate Italian translation for Revo 2.2.5 [modxcms#7551] adding an additional check so that the destination static file can't be an existing directory Czech translation update Correction in setting lexicon [modxcms#7654] Fix Update processor for ResourceGroup-restricted TVs Preserve backwards compatibility(add 'object' key) after objectType fix Last changes in the German translation for Revo 2.2.5 [modxcms#8767] add changelog entry Possible fix for bug [modxcms#4430] [modxcms#8767] possible bug fix [modxcms#8545] add changelog entry [modxcms#8089] add changelog entry ...
pavsyk created Redmine issue ID 4430
If a static resource e.g. for a file "xyz.pdf" is created and the path to the file is incorrect, the server returns HTTP 200 response code with no content:
Expected behaviour: HTTP 404 response code, though it is a bit questionable, because the static resource exists, but the underlying file does not. Nevertheless, the response code shoud not be 200.
The text was updated successfully, but these errors were encountered: