--- mini-httpd-1.19.orig/debian/changelog +++ mini-httpd-1.19/debian/changelog @@ -0,0 +1,102 @@ +mini-httpd (1.19-9.2build1) oneiric; urgency=low + + * Rebuild for OpenSSL 1.0.0. + + -- Colin Watson Tue, 17 May 2011 13:12:20 +0100 + +mini-httpd (1.19-9.2) unstable; urgency=medium + + [Jari Aalto] + * Non-maintainer upload. + * debian/patches + - (number 10): New patch to fix htpasswd.c:52: error: + conflicting types for 'getline'. . Thanks to Ruben Molina + . (FTBFS RC Bug serious; Closes: #552844) + + -- Jari Aalto Thu, 07 Jan 2010 11:13:26 +0200 + +mini-httpd (1.19-9.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix bashism (Closes: #525366) + * Fix lintian-detected hyphen-used-as-minus-sign errors. + * Add watch file. + + -- Raphael Geissert Sun, 05 Jul 2009 19:38:05 -0500 + +mini-httpd (1.19-9) unstable; urgency=low + + * Added kFreeBSD portin patch (Closes: #498368) + - Thanks to Petr Salinger + * Enabled CGI by default (Closes: #500708) + * Fixed init.d script (Closes: #500708, #491083) + * data_dir will be created if necessary (Closes: #494437) + * Added example index.html + * changed default data_dir to /usr/share/mini-httpd/html + * Fixed typo in 03-cgi-php.dpatch + * Updated Standards-Version to 3.8.0 + + -- Marvin Stark Thu, 15 Jan 2009 15:28:53 +0100 + +mini-httpd (1.19-8) unstable; urgency=low + + * /etc/mini-httpd.conf: + - Changed data_dir to /var/www (Closes: #473140) + * debian/control: + - Removed Homepage from long description + - Added Homepage field + + -- Marvin Stark Fri, 28 Mar 2008 19:13:33 +0000 + +mini-httpd (1.19-7) unstable; urgency=low + + * Patched PHP CGI errors (Closes: #462930) + Thanks to Thorsten Schmale + * Changed Standards-Version to 3.7.3 + * Fixed init.d script + + -- Marvin Stark Tue, 05 Feb 2008 08:56:53 +0000 + +mini-httpd (1.19-6) unstable; urgency=low + + * Changed start behavior in default file (Closes: #454230) + 1 = start; 0 = stop + + -- Marvin Stark Tue, 04 Dec 2007 21:52:32 +0000 + +mini-httpd (1.19-5) unstable; urgency=low + + * Removed stripping flag from Makefile (Closes: #437570) + + -- Marvin Stark Wed, 15 Aug 2007 13:11:22 +0000 + +mini-httpd (1.19-4) unstable; urgency=low + + * Removed Daniel from uploaders as wished by him. + * Fixed init script (Closes: #407775). + Thanks to Andreas Metzler. + + -- Marvin Stark Sun, 21 Jan 2007 11:52:01 +0000 + +mini-httpd (1.19-3) unstable; urgency=low + + * Pidfile will be removed, if mini-http gets removed or stopped (Closes: #387941). + * Changed start behavior of mini-httpd. + + -- Marvin Stark Wed, 25 Oct 2006 21:47:43 +0200 + +mini-httpd (1.19-2) unstable; urgency=low + + * Resolved conflicts with apache2-utils (Closes: #385268). + * Added LSB initscript header. + * Renamed mini_httpd.conf to mini-httpd.conf + * Renamed mini_httpd.default to mini-httpd.default + * Renamed mini_httpd.init.d to mini-httpd.init.d + + -- Marvin Stark Wed, 13 Sep 2006 18:11:12 +0200 + +mini-httpd (1.19-1) unstable; urgency=low + + * Initial release (Closes: #376599, #308660). + + -- Marvin Stark Mon, 3 Jul 2006 20:12:42 +0200 --- mini-httpd-1.19.orig/debian/rules +++ mini-httpd-1.19/debian/rules @@ -0,0 +1,75 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/dpatch/dpatch.make + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +build: patch + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + CFLAGS="$(CFLAGS)" $(MAKE) all \ + MANDIR="debian/mini-httpd/usr/share/man" \ + SSL_TREE="/usr" \ + SSL_DEFS="-DUSE_SSL" \ + SSL_INC="-I${SSL_TREE}/include/openssl" \ + SSL_LIBS="-L${SSL_TREE}/lib -lssl -lcrypto" + + # Moving index.html to its designated directory. + install -D -m 0644 debian/html/index.html debian/mini-httpd/usr/share/mini-httpd/html/index.html + + # Moving mini_httpd to its designated directory. + install -D mini_httpd debian/mini-httpd/usr/sbin/mini-httpd + + # Moving htpasswd to its designated directory. + install -D htpasswd debian/mini-httpd/usr/bin/htpasswd + + # Moving manpages to its designated directory. + install -D htpasswd.1 debian/mini-httpd/usr/share/man/man1/htpasswd.1 + install -D mini_httpd.8 debian/mini-httpd/usr/share/man/man8/mini-httpd.8 + + # Moving example configuration to its designated directory. + install -D -m 0644 debian/config/mini-httpd.conf debian/mini-httpd/etc/mini-httpd.conf + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installinit + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_strip + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- mini-httpd-1.19.orig/debian/mini-httpd.postrm +++ mini-httpd-1.19/debian/mini-httpd.postrm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = remove ] +then + dpkg-divert --package mini-httpd --rename --remove /usr/share/man/man1/htpasswd.1.gz + dpkg-divert --package mini-httpd --rename --remove /usr/bin/htpasswd +fi + +#DEBHELPER# --- mini-httpd-1.19.orig/debian/mini-httpd.preinst +++ mini-httpd-1.19/debian/mini-httpd.preinst @@ -0,0 +1,15 @@ +#!/bin/sh -e + +if [ "$1" = install ] || [ $1 = upgrade ] +then + for p in apache2-utils; do + dpkg-divert --package mini-httpd --divert \ + /usr/share/man/man1/htpasswd.${p}.1.gz \ + --rename /usr/share/man/man1/htpasswd.1.gz + dpkg-divert --package mini-httpd --divert \ + /usr/bin/htpasswd.${p} --rename /usr/bin/htpasswd + done + +fi + +#DEBHELPER# --- mini-httpd-1.19.orig/debian/watch +++ mini-httpd-1.19/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://www.acme.com/software/mini_httpd/mini_httpd-(.+)\.tar\.gz --- mini-httpd-1.19.orig/debian/mini-httpd.init.d +++ mini-httpd-1.19/debian/mini-httpd.init.d @@ -0,0 +1,85 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: mini-httpd +# Required-Start: $local_fs +# Required-Stop: $local_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: mini-httpd start script +# Description: this script starts mini-httpd +### END INIT INFO + +# Globals +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/mini-httpd +NAME=mini-httpd +DESC="web server" + +test -x $DAEMON || exit 0 + +# Include mini-httpd defaults if available +if [ -f /etc/default/mini-httpd ] +then + . /etc/default/mini-httpd +fi + +set -e + +# Functions +start() { + if [ "$START" = "1" ] + then + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + else + printf "You have to edit /etc/mini-httpd.conf and\n/etc/default/mini-httpd before running mini-httpd!\n" + exit 0 + fi +} + +stop() { + echo -n "Stopping $DESC: " + # Get pid number + if [ -e /var/run/$NAME.pid ] + then + PID=`cat /var/run/$NAME.pid` + if [ -d /proc/$PID ] + then + start-stop-daemon -v --stop --quiet --oknodo --pidfile /var/run/$NAME.pid + else + # we need to remove the pidfile manually + if [ -e /var/run/$NAME.pid ] + then + rm -f /var/run/$NAME.pid + fi + fi + else + start-stop-daemon --stop --quiet --oknodo --name $DAEMON + fi + echo "$NAME." +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart|force-reload) + stop + start + ;; + + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 --- mini-httpd-1.19.orig/debian/compat +++ mini-httpd-1.19/debian/compat @@ -0,0 +1 @@ +4 --- mini-httpd-1.19.orig/debian/control +++ mini-httpd-1.19/debian/control @@ -0,0 +1,17 @@ +Source: mini-httpd +Section: web +Priority: optional +Maintainer: Marvin Stark +Build-Depends: debhelper (>= 4), dpatch, libssl-dev +Homepage: http://www.acme.com/software/mini_httpd +Standards-Version: 3.8.0 + +Package: mini-httpd +Architecture: any +Depends: ${shlibs:Depends} +Provides: httpd, httpd-cgi +Description: a small HTTP server + mini-httpd implements all basic features of a HTTPD, including: GET,HEAD,POST + methods, common MIME types, basic authentication, virtual hosting, CGI, + directory listing, trailing-slash redirection, standard logging, custom error + pages etc. It also can be configured to do SSL and IPv6. --- mini-httpd-1.19.orig/debian/copyright +++ mini-httpd-1.19/debian/copyright @@ -0,0 +1,28 @@ +This package was debianized by Marvin Stark on +Mon, 3 Jul 2006 20:12:42 +0200. + +It was downloaded from . + +Copyright Holder: Jef Poskanzer + +License: + + Copyright (C) 1999-2000 Jef Poskanzer + + Redistribution and use in source and binary forms, with or without + modification, are permitted under the terms of the BSD License. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. + +On Debian systems, the complete text of the BSD License +can be found in `/usr/share/common-licenses/BSD'. --- mini-httpd-1.19.orig/debian/docs +++ mini-httpd-1.19/debian/docs @@ -0,0 +1,3 @@ +README +mime_encodings.txt +mime_types.txt --- mini-httpd-1.19.orig/debian/mini-httpd.default +++ mini-httpd-1.19/debian/mini-httpd.default @@ -0,0 +1,10 @@ +# Defaults for mini_httpd initscript +# Author: Marvin Stark + +# Start daemon? +# 0 = no +# 1 = yes +START=0 + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="-C /etc/mini-httpd.conf" --- mini-httpd-1.19.orig/debian/html/index.html +++ mini-httpd-1.19/debian/html/index.html @@ -0,0 +1,10 @@ + + + + +Welcome page + + +It works! + + --- mini-httpd-1.19.orig/debian/patches/05-manpage-hyphen.dpatch +++ mini-httpd-1.19/debian/patches/05-manpage-hyphen.dpatch @@ -0,0 +1,128 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 05-manpage-hyphen.dpatch by Raphael Geissert +## +## DP: Escape minus signs as needed. + +@DPATCH@ + +--- mini-httpd-1.19.orig/mini_httpd.8 2009-07-05 19:45:04.000000000 -0500 ++++ mini-httpd-1.19/mini_httpd.8 2009-07-05 19:50:45.000000000 -0500 +@@ -107,7 +107,7 @@ + .B -dd + Specifies a directory to chdir() to after chrooting. + If you're not chrooting, you might as well do a single chdir() with +-the -d flag. ++the \-d flag. + If you are chrooting, this lets you put the web files in a subdirectory + of the chroot tree, instead of in the top level mixed in with the + chroot files. +@@ -172,7 +172,7 @@ + The config-file option name for this flag is "maxage". + .TP + .B -S +-If mini_httpd is configured to do SSL/HTTPS, then the -S flag is available ++If mini_httpd is configured to do SSL/HTTPS, then the \-S flag is available + to enable this feature. + The config-file option name for this flag is "ssl". + .TP +@@ -207,7 +207,7 @@ + mini_httpd supports the CGI 1.1 spec. + .PP + In order for a CGI program to be run, its name must match the pattern +-you specify with the -c flag ++you specify with the \-c flag + This is a simple shell-style filename pattern. + You can use * to match any string not including a slash, + or ** to match any string including slashes, +@@ -255,12 +255,12 @@ + Check your system's syslodg man page for how to do this. + In FreeBSD you would put something like this in /etc/rc.conf: + .nf +- syslogd_flags="-l /usr/local/www/data/dev/log" ++ syslogd_flags="\-l /usr/local/www/data/dev/log" + .fi + Substitute in your own chroot tree's pathname, of course. + Don't worry about creating the log socket, syslogd wants to do that itself. + (You may need to create the dev directory.) +-In Linux the flag is -a instead of -l, and there may be other differences. ++In Linux the flag is \-a instead of \-l, and there may be other differences. + .SH "MULTIHOMING" + .PP + Multihoming means using one machine to serve multiple hostnames. +@@ -308,7 +308,7 @@ + probably out of luck. + .PP + Third and last, you must set up mini_httpd to handle the multiple hosts. +-The easiest way is with the -v flag. ++The easiest way is with the \-v flag. + This works with either CNAME multihosting or multiple-IP multihosting. + What it does is send each incoming request to a subdirectory based on the + hostname it's intended for. +@@ -321,26 +321,26 @@ + If you're using old-style multiple-IP multihosting, you should also create + symbolic links from the numeric addresses to the names, like so: + .nf +- ln -s www.acme.com 192.100.66.1 +- ln -s www.joe.acme.com 192.100.66.200 +- ln -s www.jane.acme.com 192.100.66.201 ++ ln \-s www.acme.com 192.100.66.1 ++ ln \-s www.joe.acme.com 192.100.66.200 ++ ln \-s www.jane.acme.com 192.100.66.201 + .fi + This lets the older HTTP/1.0 browsers find the right subdirectory. + .PP + There's an optional alternate step three if you're using multiple-IP + multihosting: run a separate mini_httpd process for each hostname, using +-the -h flag to specify which one is which. ++the \-h flag to specify which one is which. + This gives you more flexibility, since you can run each of these processes + in separate directories or with different options. + Example: + .nf +- ( cd /usr/www ; mini_httpd -h www.acme.com ) +- ( cd /usr/www/joe ; mini_httpd -u joe -h www.joe.acme.com ) +- ( cd /usr/www/jane ; mini_httpd -u jane -h www.jane.acme.com ) ++ ( cd /usr/www ; mini_httpd \-h www.acme.com ) ++ ( cd /usr/www/joe ; mini_httpd \-u joe \-h www.joe.acme.com ) ++ ( cd /usr/www/jane ; mini_httpd \-u jane \-h www.jane.acme.com ) + .fi + But remember, this multiple-process method does not work with CNAME +-multihosting - for that, you must use a single mini_httpd process with +-the -v flag. ++multihosting \(hy for that, you must use a single mini_httpd process with ++the \-v flag. + .SH "CUSTOM ERRORS" + .PP + mini_httpd lets you define your own custom error pages for the various +@@ -416,15 +416,15 @@ + You can also create one for yourself, using the openssl tool. + Step one - create the key and certificate request: + .nf +- openssl req -new > cert.csr ++ openssl req \-new > cert.csr + .fi +-Step two - remove the passphrase from the key: ++Step two \(hy remove the passphrase from the key: + .nf +- openssl rsa -in privkey.pem -out key.pem ++ openssl rsa \-in privkey.pem \-out key.pem + .fi +-Step three - convert the certificate request into a signed certificate: ++Step three \(hy convert the certificate request into a signed certificate: + .nf +- openssl x509 -in cert.csr -out cert.pem -req -signkey key.pem -days 365 ++ openssl x509 \-in cert.csr \-out cert.pem \-req \-signkey key.pem \-days 365 + .fi + This creates four files. + The ones you want are cert.pem and key.pem. +--- mini-httpd-1.19.orig/htpasswd.1 1999-09-28 13:49:35.000000000 -0500 ++++ mini-httpd-1.19/htpasswd.1 2009-07-05 19:57:50.000000000 -0500 +@@ -9,7 +9,7 @@ + .SH DESCRIPTION + .PP + Sets a user's password in an httpd-style password file. +-The -c flag creates a new file. ++The \-c flag creates a new file. + .SH AUTHOR + Rob McCool. + Modified 29aug97 by Jef Poskanzer to accept new password on stdin, --- mini-httpd-1.19.orig/debian/patches/10-bug-552844-ftbfs-htpasswd.c-onflicting-types.dpatch +++ mini-httpd-1.19/debian/patches/10-bug-552844-ftbfs-htpasswd.c-onflicting-types.dpatch @@ -0,0 +1,28 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## ../bug-552844-ftbfs-htpasswd.c-onflicting-types.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Bug#552844 FTBFS: htpasswd.c:52: error: conflicting types for getline + +@DPATCH@ + +--- mini-httpd-1.19.orig/htpasswd.c ++++ mini-httpd-1.19/htpasswd.c +@@ -49,7 +49,7 @@ + while((line[y++] = line[x++])); + } + +-static int getline(char *s, int n, FILE *f) { ++static int mygetline(char *s, int n, FILE *f) { + register int i=0; + + while(1) { +@@ -189,7 +189,7 @@ + strcpy(user,argv[2]); + + found = 0; +- while(!(getline(line,MAX_STRING_LEN,f))) { ++ while(!(mygetline(line,MAX_STRING_LEN,f))) { + if(found || (line[0] == '#') || (!line[0])) { + putline(tfp,line); + continue; --- mini-httpd-1.19.orig/debian/patches/01-manpage.dpatch +++ mini-httpd-1.19/debian/patches/01-manpage.dpatch @@ -0,0 +1,18 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 01-manpage.dpatch by Marvin Stark +## +## DP: Fix manpage character error. + +@DPATCH@ + +--- mini-httpd-1.19/mini_httpd.8.orig 2006-07-05 00:14:37.000000000 +0200 ++++ mini-httpd-1.19/mini_httpd.8 2006-07-05 00:15:30.000000000 +0200 +@@ -432,7 +432,7 @@ + .SH "SEE ALSO" + htpasswd(1), weblog_parse(1), http_get(1) + .SH AUTHOR +-Copyright © 1999,2000 by Jef Poskanzer . All rights reserved. ++Copyright \[co] 1999,2000 by Jef Poskanzer . All rights reserved. + .\" Redistribution and use in source and binary forms, with or without + .\" modification, are permitted provided that the following conditions + .\" are met: --- mini-httpd-1.19.orig/debian/patches/04-kfreebsd.dpatch +++ mini-httpd-1.19/debian/patches/04-kfreebsd.dpatch @@ -0,0 +1,36 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 04-kfreebsd.dpatch by Marvin Stark +## Thanks to Petr Salinger who has written this patch. +## +## DP: mini-httpd does not build on GNU/kFreeBSD + +@DPATCH@ + +--- mini-httpd-1.19/port.h~ 2008-09-09 15:37:08.000000000 +0000 ++++ mini-httpd-1.19/port.h 2008-09-09 15:37:08.000000000 +0000 +@@ -21,6 +21,9 @@ + #elif defined(__svr4__) + # define OS_SysV + # define ARCH "SysV" ++#elif defined(__GLIBC__) ++# define OS_GLIBC ++# define ARCH "GLIBC" + #else + # define OS_UNKNOWN + # define ARCH "UNKNOWN" +@@ -80,6 +83,15 @@ + # define HAVE_INT64T + #endif /* OS_Linux */ + ++#ifdef OS_GLIBC ++# define HAVE_DAEMON ++# define HAVE_SETSID ++# define HAVE_WAITPID ++# define HAVE_TM_GMTOFF ++# define HAVE_SCANDIR ++# define HAVE_INT64T ++#endif /* OS_GLIBC */ ++ + #ifdef OS_Solaris + # define HAVE_SETSID + # define HAVE_WAITPID --- mini-httpd-1.19.orig/debian/patches/02-makefile.dpatch +++ mini-httpd-1.19/debian/patches/02-makefile.dpatch @@ -0,0 +1,18 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 02-makefile.dpatch by Marvin Stark +## +## DP: Remove stripping option. + +@DPATCH@ + +--- mini-httpd-1.19/Makefile.orig 2007-08-15 12:58:48.000000000 +0000 ++++ mini-httpd-1.19/Makefile 2007-08-15 12:58:55.000000000 +0000 +@@ -26,7 +26,7 @@ + CDEFS = ${SSL_DEFS} ${SSL_INC} + CFLAGS = -O ${CDEFS} + #CFLAGS = -g ${CDEFS} +-LDFLAGS = -s ++#LDFLAGS = -s + #LDFLAGS = -g + LDLIBS = ${SSL_LIBS} ${SYSV_LIBS} ${CRYPT_LIB} + --- mini-httpd-1.19.orig/debian/patches/03-cgi-php.dpatch +++ mini-httpd-1.19/debian/patches/03-cgi-php.dpatch @@ -0,0 +1,37 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 03-cgi-php.dpatch by Marvin Stark +## Thanks to Thorsten Schmale who has written this patch. +## +## DP: mini_httpd does not run php cgi's. +## DP: mini_httpd shows following error: "No input file specified". + +@DPATCH@ + +--- mini-httpd-1.19/mini_httpd.c.orig 2008-02-05 08:40:28.000000000 +0000 ++++ mini-httpd-1.19/mini_httpd.c 2008-02-05 08:50:35.000000000 +0000 +@@ -1129,7 +1129,7 @@ + int r, file_len, i; + const char* index_names[] = { + "index.html", "index.htm", "index.xhtml", "index.xht", "Default.htm", +- "index.cgi" }; ++ "index.cgi", "index.php" }; + + /* Set up the timeout for reading. */ + #ifdef HAVE_SIGSET +@@ -2117,6 +2117,7 @@ + int envn; + char* cp; + char buf[256]; ++ char rp[MAXPATHLEN]; + + envn = 0; + envp[envn++] = build_env( "PATH=%s", CGI_PATH ); +@@ -2134,7 +2135,7 @@ + envp[envn++] = build_env( "SERVER_PORT=%s", buf ); + envp[envn++] = build_env( + "REQUEST_METHOD=%s", get_method_str( method ) ); +- envp[envn++] = build_env( "SCRIPT_NAME=%s", path ); ++ envp[envn++] = build_env( "SCRIPT_FILENAME=%s", realpath(file, rp) ); + if ( pathinfo != (char*) 0 ) + { + envp[envn++] = build_env( "PATH_INFO=/%s", pathinfo ); --- mini-httpd-1.19.orig/debian/patches/00list +++ mini-httpd-1.19/debian/patches/00list @@ -0,0 +1,6 @@ +01-manpage.dpatch +02-makefile.dpatch +03-cgi-php.dpatch +04-kfreebsd.dpatch +05-manpage-hyphen.dpatch +10-bug-552844-ftbfs-htpasswd.c-onflicting-types.dpatch --- mini-httpd-1.19.orig/debian/config/mini-httpd.conf +++ mini-httpd-1.19/debian/config/mini-httpd.conf @@ -0,0 +1,40 @@ +# Example config for mini_httpd. +# Author: Marvin Stark + +# Uncomment this line for turning on ssl support. +#ssl + +# On which host mini_httpd should bind? +host=localhost + +# On which port mini_httpd should listen? +port=80 + +# Which user mini_httpd should use? +user=nobody + +# Run in chroot mode? +#chroot # yes +nochroot # no + +# Working directory of mini_httpd. +#dir= + +# We are the web files stored? +# Please change this to your needs. +data_dir=/usr/share/mini-httpd/html + +# CGI path +cgipat=cgi-bin/* + +# Which certificate to use? +#certfile= + +# Which logfile to use? +logfile=/var/log/mini-httpd.log + +# Which pidfile to use? +pidfile=/var/run/mini-httpd.pid + +# Which charset to use? +charset=iso-8859-1