Make use resource_file_readonly use sendfile when available #342

Closed
wants to merge 7 commits into
from

Conversation

Projects
None yet
4 participants

hce commented Jun 5, 2012

This also fixes the Issue #319 on systems where sendfile is available in erlang (No matter if sendfile is supported by the underlying OS). The issue will continue to exist on erlang systems that do not have the file:sendfile function available.

Requires the webzmachine sendfile patch to work.

Hans-Christian Espérer added some commits May 3, 2012

Hans-Christian Espérer Added an option to allow the site owner to moderate/review comments 254cc51
Hans-Christian Espérer Log the user agent and IP address for each comment 9805670
Hans-Christian Espérer Display a confirmation dialog first when deleting comments 3eb87ee
Hans-Christian Espérer Merge branch 'master' of github.com:hce/zotonic 5119882
Hans-Christian Espérer Merge branch 'master' of https://github.com/zotonic/zotonic e26f006
Hans-Christian Espérer Add support for sendfile.
This patch needs the updated version of webzmachine to work. It is made backwards compatible by checking each time if file:sendfile exists.
8326b27
Hans-Christian Espérer Properly return filesize for static files in all sendfile cases c6c9b1f

The user_agent value should be escaped before echo-ing it in the html.
It can contain any kind of data (including quotes and extra html).

I think you need to add your name & copyright here (and as well above the license below).

Owner

mworrell commented Aug 20, 2012

I see that we have already merged the comment changes.
I fixed the escape issue in 3834a3c

Owner

arjan commented Sep 12, 2012

It would be nice to have this functionality, but this pull request is a bit cluttered with other commits. Can you create a new topic branch on the current master and rebase the relevant commits from this pull request there?

hce commented Sep 13, 2012

I'm a bit busy ATM, but will do so as soon as possible!

Owner

mworrell commented Sep 20, 2012

I stumbled over this when we were checking an nginx problem:

http://www.vanpattenmedia.com/2012/a-tale-of-stale-content/

Basically sendfile and virtualisation are not friends.
So the use of sendfile needs to be configurable.

Owner

arjan commented Sep 20, 2012

agreed.
But it's good to have anyway. Lessens the load on the vm.

Owner

kaos commented Nov 22, 2012

What has happened with this pull request... ?
All commits point to the zotonic/zotonic repo, none to hce/zotonic.
That's OK for those commits that actually are merged in I suppose, but none of the sendfile changes are...
And btw, how did the last commit (c6c9b1f) "Properly return filesize..." end up in the pull request? It's not in hce's sendfile branch.
I've spent an hour trying to figure this out, to no avail. It seems that there are commits dangling on the github server not reachable by any refs I know about.

Owner

arjan commented Nov 23, 2012

This is very weird indeed. The commits are not in the main zotonic repo, I just checked.

@hce if you still want this included, can you make a new topic branch and create a new pull request?

arjan closed this Nov 23, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment