Project

General

Profile

Actions

Feature #1615

closed

mod_post_to_disk for lighttpd 1.5

Added by stepancheg over 16 years ago. Updated over 8 years ago.

Status:
Obsolete
Priority:
Normal
Category:
3rd party
Target version:
ASK QUESTIONS IN Forums:

Description

We've written module for lighttpd1.5 -- mod_post_to_disk. Module just dumps whole request (header + body) to disk. Example configuration:


$HTTP["url"] =~ "^/upload/" {
  post_to_disk.tmp-dir = "/var/spool/lighttpd/upload-tmp" 
  post_to_disk.done-dir = "/var/spool/lighttpd/upload-done" 
  post_to_disk.failed-dir = "/var/spool/lighttpd/upload-failed" 
}

This module is needed for reliable and fast file-upload.

Module source attached.


Files

mod_post_to_disk.c (10.8 KB) mod_post_to_disk.c stepancheg, 2008-03-27 10:04
Actions #1

Updated by Anonymous over 16 years ago

Great, if some installation instructions would be provided..
I've also had problems with unstable file uploading and want to apply this module, but unsure, if i've enough skills to install this

Actions #2

Updated by stepancheg over 16 years ago

Installation instructions are simple:

1. Compile the module and load this module into lighttpd.

2. Copy-paste above configuration into your lighttpd configuration file.

3. Create directories.

4. Restart lighttpd.

The most complex part is compiling (any external) module for lighttpd. This is out of scope of this instruction :)

Actions #3

Updated by Anonymous over 16 years ago

That's exactly what the guy has asked for and you just state it's "out of scope"? How stupid is that?

Actions #4

Updated by stepancheg over 16 years ago

Instructions to compile module is exactly the same, as for any other external module:

1. Put lighttpd header files somewhere. We have lighttpd1.5-dev Debian package with all headers in /usr/include/lighttpd1.5/ . You can use header files from just compiled lighttpd.

2. Compile with command:


gcc -fPIC -std=gnu99 -shared -o mod_post_to_disk.so -D_REENTRANT -D__EXTENSIONS__ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -DHAVE_CONFIG_H `pkg-config --cflags glib-2.0` -Wall -I/usr/include/lighttpd1.5 mod_post_to_disk.c

gcc flags vary for for different OSes. Grab them from lighttpd compilation output. These flags are suitable for most Linuxes.

3. Copy mod_post_to_disk.so to your lighttpd modules dir (/usr/lib/lighttpd/ in our lighttpd package).

4. Load module with


server.modules += ( "mod_post_to_disk" )
Actions #5

Updated by Anonymous about 16 years ago

Here is some explanations about lighty plugins:

http://trac.lighttpd.net/trac/wiki/HowToWriteALighttpdPlugin

-- chefo

Actions #6

Updated by gstrauss over 8 years ago

  • Description updated (diff)
  • Category changed from core to 3rd party
  • Assignee deleted (jan)
  • Missing in 1.5.x set to Yes
Actions #7

Updated by gstrauss over 8 years ago

  • Status changed from New to Obsolete
Actions

Also available in: Atom