8000 Incorrect HTTP code returned for a static resource · Issue #4430 · modxcms/revolution · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Closed
pavsyk opened this issue Apr 16, 2011 · 4 comments
Closed

Incorrect HTTP code returned for a static resource #4430

pavsyk opened this issue Apr 16, 2011 · 4 comments
Labels
area-core bug The issue in the code or project, which should be addressed.

Comments

@pavsyk
Copy link
pavsyk commented Apr 16, 2011

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:

Date: Fri, 15 Apr 2011 08:34:01 GMT
Server: Apache/2.2.16 (Debian)
X-Powered-By: PHP/5.3.3-7
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 0
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: application/pdf

200 OK

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.

@modxbot
Copy link
Contributor
modxbot commented May 31, 2011

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).

@modxbot
Copy link
Contributor
modxbot commented May 26, 2012

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

@modxbot
Copy link
Contributor
modxbot commented Sep 25, 2012

Eiventeleiron submitted:

Attaching a diff with possible fix. Please review and possibly merge!

Also inside this pull request: #380

@modxbot
Copy link
Contributor
modxbot commented Sep 26, 2012

Eiventeleiron submitted:

New pull request: #382

enigmatic-user pushed a commit to enigmatic-user/revolution that referenced this issue Feb 13, 2014
enigmatic-user pushed a commit to enigmatic-user/revolution that referenced this issue Feb 13, 2014
Merge remote-tracking branch 'Evengard/rel22bug4430' into bug-4430

* Evengard/rel22bug4430:
  Possible fix for bug [modxcms#4430]
enigmatic-user pushed a commit to enigmatic-user/revolution that referenced this issue Feb 13, 2014
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
  ...
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core bug The issue in the code or project, which should be addressed.
Projects
None yet
Development

No branches or pull requests

2 participants
0