Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.9.4
-
Fix Version/s: DEV backlog
-
Labels:None
-
Difficulty:Easy
-
Affected Branches:MOODLE_19_STABLE
Description
Please note my comment http://tracker.moodle.org/browse/MDL-11434?focusedCommentId=66182&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_66182 on this http://tracker.moodle.org/browse/MDL-11434 issue.
Quote:
I'd like to bring the issue about If-Modified-Since/304 Support up again because i ran into trouble recently trying to download some courses with httrack (website copier).
I'd like to run httrack like this:
$ httrack -A100000 -s0 -%s -%v2 https://moodle.fhnw.ch/user/view.php?id=2593 -* +moodle.fhnw.ch/user/view.php?id=2593* +moodle.fhnw.ch/course/view.php?id=978 +moodle.fhnw.ch/course/view.php?id=850 +moodle.fhnw.ch/course/view.php?id=967 +moodle.fhnw.ch/course/view.php?id=984 +moodle.fhnw.ch/mod/resource/* +moodle.fhnw.ch/file.php/* +.jpg +.gif +*.png
then when tachers upload new files, i'd just run
$ httrack --update
which downloads (in theory) all changed and added content from the site. The problem is that httrack uses If-Modified-Since to find out if files have changed and filelib.php still doesnt handle this. So it sends the File again and httrack downloads it although the file has not changed.
It would be great if Chris Fryer's patch could be somehow pulled into the mainline moodle. I dont quiet understand Petr Skoda's argumentation against it. "[...] if we allow caching [...]": I think enabling a proper If-Modified-Since support wouldn't "allow caching" any more then is already allowed. You cannot enforce anyway, if you allow retrieval. And the normal response headers are not changed at all. If a file got updated, it will be downloaded as before. There is no reason the browser wouldn't request changed files any more!
So please make moodle support If-Modified-Since/304 to save bandwidth.
Greets
Patrick
if-modified-since will be probably supported in 2.0 in file.php, pluginfile.php etc, but website copiers definitely will not be and can not be supported, the reason is we are abusing GET requests for database modifications, so in fact we are actively prohibiting use of these tools