Ticket #1027 (closed defect: fixed)

Opened 1 year ago

Last modified 2 months ago

alias and mod_compress

Reported by: duck Assigned to: jan
Priority: normal Milestone:
Component: mod_compress Version: 1.5.x-svn
Severity: normal Keywords: patch
Cc: Blocking:
Need Feedback: 0

Description

When using an alias, mod_compress dosent create subdirectories for the cached compressed files.

Exmaple

www.domain1.com/my.css

www.domain2.com/n/my.css (n is an alis to domain1.com)

error: 2007-02-12 12:57:03: (mod_compress.c.398) creating cachefile /var/lib/lighttpd/cache/compress//n/themes/obalanet/screen.css-gzip-7964071-2250-1170856112 failed No such file or directory

but /var/lib/lighttpd/cache/compress/ exists.

Attachments

Fix-mod_compress-bug-1027-lighty1.4.patch (3.1 kB) - added by stbuehler on 02/15/2008 03:06:18 PM.
Tested patch (previous missed symbol "ERROR"), ignore trailing slash now
Fix-mod_compress-bug-1027-lighty1.5.patch (7.1 kB) - added by stbuehler on 02/15/2008 03:42:21 PM.
Ignore trailing slash now + ERROR log style
lighttpd-1.4.18-compress-mkdir.patch (2.8 kB) - added by spillgroup on 03/07/2008 01:42:36 PM.
Optimized version of patch for 1.4.18.
lighttpd-1.4.19-compress-mkdir.patch (1.1 kB) - added by spillgroup on 03/12/2008 01:56:26 PM.
Optimization patch for 1.4.19

Change History

02/20/2007 12:48:26 AM changed by darix

can you show us the module load order? the easiest thing might be lighttpd -tp -f /path/to/config 2>&1 | less and paste the server.modules section from it.

02/20/2007 03:12:19 AM changed by j3rky

cachefile /var/lib/lighttpd/cache/compress//n/themes/obalanet/screen.css-gzip-7964071-2250-1170856112

isn't there one slash too many after comptess?

05/09/2007 05:59:44 PM changed by ecook@justastudio.com

I'm having the same problem here. Is there a solution?

My server.modules section:

server.modules = (
	"mod_indexfile",
	"mod_access",
	"mod_alias",
	"mod_accesslog",
	"mod_rewrite",
	"mod_evhost",
	"mod_compress",
	"mod_cgi",
	"mod_fastcgi",
	"mod_dirlisting",
	"mod_staticfile",
	# 11
)

01/26/2008 03:30:30 PM changed by stbuehler

  • component changed from core to mod_compress.
  • summary changed from alias an mod compress to alias and mod_compress.
  • version changed from 1.4.13 to 1.4.18.
  • keywords set to patch.
  • blocking changed.
  • pending changed.

I did not try if the patches are working (I don't use mod_compress), so please report if it works for you.

02/08/2008 10:47:29 AM changed by stut

Was having the same problem here on 1.4.18 - can confirm that the attached patch for 1.4 works.

02/11/2008 11:14:24 AM changed by anonymous

mkdir_recursive will cause segfault while creating something like "/dir1/" (with trailing slash).

while ((p = strchr(p + 1, '/')) != NULL) {

must be

while ((*p) && (p = strchr(p + 1, '/')) != NULL)) { 

02/15/2008 03:06:18 PM changed by stbuehler

  • attachment Fix-mod_compress-bug-1027-lighty1.4.patch added.

Tested patch (previous missed symbol "ERROR"), ignore trailing slash now

02/15/2008 03:42:21 PM changed by stbuehler

  • attachment Fix-mod_compress-bug-1027-lighty1.5.patch added.

Ignore trailing slash now + ERROR log style

02/15/2008 04:22:09 PM changed by stbuehler

  • version changed from 1.4.18 to 1.4.x-svn.

+ Duplicate of #230

02/23/2008 10:05:26 AM changed by anonymous

please fix! this is a huge annoyance.

02/26/2008 04:25:56 PM changed by stbuehler

  • version changed from 1.4.x-svn to 1.5.x-svn.

Fixed in [2081] for 1.4.x

03/07/2008 01:41:58 PM changed by spillgroup

I've attached a slightly modified version for 1.4.18 which is a bit smarter with mkdir's. The previous behaviour was to try and mkdir *every* part of a file's patch on *every* access (even when already in the cache). This patch moves the mkdir's to after the place where it checks for existence.

03/07/2008 01:42:36 PM changed by spillgroup

  • attachment lighttpd-1.4.18-compress-mkdir.patch added.

Optimized version of patch for 1.4.18.

03/12/2008 01:56:26 PM changed by spillgroup

  • attachment lighttpd-1.4.19-compress-mkdir.patch added.

Optimization patch for 1.4.19

03/21/2008 03:26:06 PM changed by stbuehler

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [2135] for lighty-1.5.x with optimization - i hope it works ;-)


Add/Change #1027 (alias and mod_compress)




Change Properties
Action