[patch]: sapi/thttpd/thttpd_patch
| From: | Jonas Jochum | Date: | Wed, 17 May 2000 18:56:13 +0000 |
| Subject: | [patch]: sapi/thttpd/thttpd_patch | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-15135@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- --- /usr/src/php-4.0RC2/sapi/thttpd/thttpd_patch Sun May 14 14:43:10 2000
+++ thttpd_patch Wed May 17 20:51:21 2000
@@ -19,10 +19,10 @@
NETLIBS = @V_NETLIBS@
INSTALL = @INSTALL@
- -diff -ur thttpd-2.16/libhttpd.c thttpd-2.16-php/libhttpd.c
- ---- thttpd-2.16/libhttpd.c Wed Dec 15 23:22:50 1999
- -+++ thttpd-2.16-php/libhttpd.c Mon Dec 20 01:05:47 1999
- -@@ -75,6 +75,8 @@
+diff -du thttpd-2.16/libhttpd.c.old thttpd-2.16/libhttpd.c
+--- thttpd-2.16/libhttpd.c.old Wed May 17 20:38:30 2000
++++ thttpd-2.16/libhttpd.c Wed May 17 20:43:08 2000
+@@ -79,6 +79,8 @@
#include "match.h"
#include "tdate_parse.h"
@@ -31,52 +31,57 @@
#ifndef STDIN_FILENO
#define STDIN_FILENO 0
#endif
- -@@ -211,7 +213,11 @@
+@@ -227,11 +229,15 @@
free( (void*) hs->cwd );
if ( hs->cgi_pattern != (char*) 0 )
free( (void*) hs->cgi_pattern );
+ if ( hs->php_pattern != (char*) 0 )
- -+ free( (void *) hs->php_pattern );
++ free( (void*) hs->php_pattern );
+ if ( hs->url_pattern != (char*) 0 )
+ free( (void*) hs->url_pattern );
+ if ( hs->local_pattern != (char*) 0 )
+ free( (void*) hs->local_pattern );
free( (void*) hs );
- -+
++
+ thttpd_php_shutdown();
}
- -@@ -244,6 +250,7 @@
- - else
- - hs->hostname = strdup( hostname );
+@@ -293,6 +299,7 @@
+ }
+
hs->port = port;
+ hs->php_pattern = strdup("*.php");
if ( cgi_pattern == (char*) 0 )
hs->cgi_pattern = (char*) 0;
else
- -@@ -272,6 +279,8 @@
+@@ -342,6 +349,9 @@
+ httpd_set_logfp( hs, logfp );
hs->no_symlinks = no_symlinks;
hs->vhost = vhost;
- -
++
+ thttpd_php_init();
+
- - /* Create socket. */
- - hs->listen_fd = socket( AF_INET, SOCK_STREAM, 0 );
- - if ( hs->listen_fd < 0 )
- -@@ -3129,6 +3138,11 @@
+ hs->no_empty_referers = no_empty_referers;
+ memset( &hs->host_addr, 0, sizeof(hs->host_addr) );
+ memcpy( &hs->host_addr, saP, sockaddr_len( saP ) );
+@@ -3268,6 +3278,11 @@
( hc->sb.st_mode & S_IXOTH ) &&
match( hc->hs->cgi_pattern, hc->expnfilename ) )
return cgi( hc );
+
- -+ if ( hc->hs->php_pattern != (char*) 0 &&
- -+ match( hc->hs->php_pattern, hc->expnfilename)) {
- -+ return thttpd_php_request( hc );
- -+ }
++ if ( hc->hs->php_pattern != (char*) 0 &&
++ match( hc->hs->php_pattern, hc->expnfilename)) {
++ return thttpd_php_request( hc );
++ }
/* It's not CGI. If it's executable or there's pathinfo, someone's
** trying to either serve or run a non-CGI file as CGI. Either case
- -diff -ur thttpd-2.16/libhttpd.h thttpd-2.16-php/libhttpd.h
- ---- thttpd-2.16/libhttpd.h Wed Dec 8 19:53:34 1999
- -+++ thttpd-2.16-php/libhttpd.h Mon Dec 20 01:06:09 1999
- -@@ -57,6 +57,7 @@
- - struct in_addr host_addr;
+diff -du thttpd-2.16/libhttpd.h.old thttpd-2.16/libhttpd.h
+--- thttpd-2.16/libhttpd.h.old Wed May 17 20:38:34 2000
++++ thttpd-2.16/libhttpd.h Wed May 17 20:43:43 2000
+@@ -70,6 +70,7 @@
+ httpd_sockaddr host_addr;
int port;
char* cgi_pattern;
+ char* php_pattern;
- -- end --
That's the fix for thttpd_patch to make it apply cleanly.
- --
MfG,
Jonas Jochum
commandline net services
- -------------------------------------------------------------------------
tel: 07223-911794 | cmd:~ # Systemadministration, Netzwerkverwaltung
fax: 07223-911795 | cmd:~ # Einrichtung von *BSD/Linux-Servern
d2 : 0173-5712481 | cmd:~ # Datenbank/Internetprogrammierung
jj@commandline.de | cmd:~ # Webdesign
www.commandline.de |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (FreeBSD)
Comment: Made with pgp4pine
iEYEARECAAYFAjki61IACgkQF1ki3orczCCVIwCeMVx+x/C4S5la+pPLzdktKfDT
/MUAn0KZcPS2W8EmLT25RyR1o5b0oWqt
=E2lZ
-----END PGP SIGNATURE-----