Project

General

Profile

Feature #1615

mod_post_to_disk for lighttpd 1.5

Added by stepancheg over 11 years ago. Updated about 3 years ago.

Status:
Obsolete
Priority:
Normal
Assignee:
-
Category:
3rd party
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:
Yes

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.

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

History

#1

Updated by Anonymous over 11 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

#2

Updated by stepancheg over 11 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 :)

#3

Updated by Anonymous about 11 years ago

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

#4

Updated by stepancheg about 11 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" )
#5

Updated by Anonymous about 11 years ago

Here is some explanations about lighty plugins:

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

-- chefo

#6

Updated by gstrauss about 3 years ago

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

Updated by gstrauss about 3 years ago

  • Status changed from New to Obsolete

Also available in: Atom