mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
Update to 3.1 release.
This commit is contained in:
parent
d0144fcd16
commit
ab09f0fef4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=122305
@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= pserv
|
||||
PORTVERSION= 3.0
|
||||
PORTVERSION= 3.1
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
|
@ -1,2 +1,2 @@
|
||||
MD5 (pserv-3.0.tar.Z) = 2c38f859631ab09f3cd4ff15b4de457e
|
||||
SIZE (pserv-3.0.tar.Z) = 49961
|
||||
MD5 (pserv-3.1.tar.Z) = c106d7709bf2a65e9acf16147f2e3a1f
|
||||
SIZE (pserv-3.1.tar.Z) = 49511
|
||||
|
@ -1,10 +1,10 @@
|
||||
--- sources/Makefile.orig Mon Aug 30 13:19:03 2004
|
||||
+++ sources/Makefile Wed Sep 15 14:38:14 2004
|
||||
--- sources/Makefile.orig Fri Nov 5 23:04:15 2004
|
||||
+++ sources/Makefile Wed Nov 24 14:52:32 2004
|
||||
@@ -1,11 +1,11 @@
|
||||
#Change the following to your needs
|
||||
-CC = gcc
|
||||
-#insert here flags, eg. optimizations
|
||||
-CFLAGS = -Wall -Os
|
||||
-CFLAGS = -Wall -Os -pedantic
|
||||
+CC ?= gcc
|
||||
LIBS =
|
||||
SRCS = main.c handlers.c mime.c log.c
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- sources/handlers.c.orig Fri May 21 16:58:26 2004
|
||||
+++ sources/handlers.c Wed Sep 15 14:47:49 2004
|
||||
@@ -24,6 +24,7 @@
|
||||
--- sources/handlers.c.orig Fri Nov 5 23:04:15 2004
|
||||
+++ sources/handlers.c Wed Nov 24 15:12:55 2004
|
||||
@@ -25,6 +25,7 @@
|
||||
#endif
|
||||
|
||||
extern char cgiRoot[MAX_PATH_LEN+1]; /* root for CGI scripts exec */
|
||||
@ -8,7 +8,7 @@
|
||||
extern int port; /* server port */
|
||||
extern char defaultFileName[MAX_PATH_LEN+1]; /* default name for index, default or similar file */
|
||||
|
||||
@@ -263,6 +264,14 @@
|
||||
@@ -323,6 +324,14 @@
|
||||
|
||||
i = 0;
|
||||
/* beware of not overfilling this array, check MAX_ENVP_LEN */
|
||||
@ -23,7 +23,7 @@
|
||||
strcpy(newEnvp[i], "SERVER_SOFTWARE=");
|
||||
strcat(newEnvp[i], SERVER_SOFTWARE_STR);
|
||||
strcat(newEnvp[i], "/");
|
||||
@@ -285,6 +294,11 @@
|
||||
@@ -345,6 +354,11 @@
|
||||
strcat(newEnvp[i++], req.userAgent);
|
||||
strcpy(newEnvp[i], "SCRIPT_FILENAME=");
|
||||
strcat(newEnvp[i++], completedPath);
|
||||
@ -35,7 +35,7 @@
|
||||
newEnvp[i] = NULL;
|
||||
|
||||
/* we change the current working directory to the scripts one */
|
||||
@@ -317,8 +331,252 @@
|
||||
@@ -377,8 +391,237 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -120,24 +120,9 @@
|
||||
+ else if (!howMany)
|
||||
+ printf("Nothing read from script pipe.\n");
|
||||
+ else {
|
||||
+ pipeReadBuf[howMany] = '\0';
|
||||
+ if (send(sock, pipeReadBuf, howMany, 0) < 0)
|
||||
+ {
|
||||
+ printf("error during CGI sock writing! %d\n", errno);
|
||||
+ if (errno == EAGAIN)
|
||||
+ printf("output resource temporarily not available\n");
|
||||
+ else if (errno == EPIPE)
|
||||
+ {
|
||||
+ printf("broken pipe during CGI out.\n");
|
||||
+ fatal = YES;
|
||||
+ } else if (errno == EBADF)
|
||||
+ {
|
||||
+#ifdef PRINTF_DEBUG
|
||||
+ printf("invalid out descriptor.\n");
|
||||
+#endif
|
||||
+ fatal = YES;
|
||||
+ }
|
||||
+ } else
|
||||
+ if (sendChunk(sock, pipeReadBuf, howMany) < 0)
|
||||
+ fatal = YES;
|
||||
+ else
|
||||
+ totalSentFromPipe += howMany;
|
||||
+ }
|
||||
+ }
|
||||
|
@ -1,24 +1,21 @@
|
||||
--- sources/main.h.orig Mon Aug 30 13:19:03 2004
|
||||
+++ sources/main.h Wed Sep 15 15:24:32 2004
|
||||
@@ -18,14 +18,16 @@
|
||||
|
||||
|
||||
--- sources/main.h.orig Wed Nov 24 11:12:35 2004
|
||||
+++ sources/main.h Wed Nov 24 14:58:06 2004
|
||||
@@ -20,12 +20,14 @@
|
||||
/* --- CPP parsing options --- */
|
||||
-#define PRINTF_DEBUG /* enable this to print some debugging messages */
|
||||
+#undef PRINTF_DEBUG /* enable this to print some debugging messages */
|
||||
#undef PRINTF_DEBUG /* enable this to print some debugging messages */
|
||||
#undef ON_THE_FLY_CONVERSION /* enable this for line ending conversion */
|
||||
+#define LOG /* enable logging to file */
|
||||
#define BRAIN_DEAD_CAST /* if your compiler is brainwashed and does not cast standard types.h structures */
|
||||
#define FORKING_SERVER /* enables to fork for every request */
|
||||
#define AUTO_INDEX /* enables auto-index of directories */
|
||||
#define SOCKADDR_REUSE /* enables reuse oth the socket (quick relaunch) */
|
||||
#define VOID_SIG_HANDLERS /* enables different signal functíon types */
|
||||
#define ADDR_LEN_TYPE_INT /* in accept() if addrlen is int */
|
||||
#define VOID_SIG_HANDLERS /* enables different signal function types */
|
||||
#undef ADDR_LEN_TYPE_INT /* in accept() if addrlen is int */
|
||||
+#define PHP /* enables transparent PHP support */
|
||||
|
||||
|
||||
/* --- Configure options --- */
|
||||
@@ -37,18 +39,19 @@
|
||||
#define CONFIG_FILE_NAME "pserv.conf" /* name of the configuration file, concatenated to DEFAULT_CONFIG_LOCATION */
|
||||
@@ -36,18 +38,19 @@
|
||||
#define MIME_TYPE_DEFAULT "application/octet-stream"
|
||||
|
||||
/* configuration file location */
|
||||
@ -29,7 +26,7 @@
|
||||
-#define DEFAULT_PORT 2000
|
||||
+#define DEFAULT_PORT 80
|
||||
#define DEFAULT_MAX_CHILDREN 5
|
||||
-#define DEFAULT_DOCS_LOCATION "/home/multix/public_html"
|
||||
-#define DEFAULT_DOCS_LOCATION "/usr/people/multix/public_html"
|
||||
+#define DEFAULT_DOCS_LOCATION "/usr/local/www/data"
|
||||
#define DEFAULT_FILE_NAME "index.html"
|
||||
#define DEFAULT_SEC_TO 1
|
||||
@ -37,14 +34,14 @@
|
||||
-#define DEFAULT_LOG_FILE "/home/multix/pserv/pserv.log"
|
||||
-#define DEFAULT_MIME_FILE "/home/multix/pserv/mime_types.dat"
|
||||
-#define DEFAULT_CGI_ROOT "/home/multix/public_html/cgi-bin"
|
||||
+#define DEFAULT_LOG_FILE "/var/log/pserv.log"
|
||||
+#define DEFAULT_MIME_FILE "/usr/local/etc/mime.types"
|
||||
+#define DEFAULT_PHP_FILE "/usr/local/bin/php"
|
||||
+#define DEFAULT_CGI_ROOT "/usr/local/www/cgi-bin"
|
||||
+#define DEFAULT_LOG_FILE "/var/log/pserv.log"
|
||||
+#define DEFAULT_MIME_FILE "/usr/local/etc/mime.types"
|
||||
+#define DEFAULT_PHP_FILE "/usr/local/bin/php"
|
||||
+#define DEFAULT_CGI_ROOT "/usr/local/www/cgi-bin"
|
||||
#define DEFAULT_SERVER_NAME "localhost"
|
||||
|
||||
/* amount of connections queued in listening */
|
||||
@@ -122,8 +125,10 @@
|
||||
@@ -120,8 +123,10 @@
|
||||
#define ADDRESS_LEN 16
|
||||
#define METHOD_LEN 16
|
||||
#define PROTOCOL_LEN 16
|
||||
@ -55,13 +52,13 @@
|
||||
|
||||
/* ------ Structures ------- */
|
||||
/* we use +1 to be safe with handling the end-of-string */
|
||||
@@ -141,7 +146,9 @@
|
||||
char protocolVersion[PROTOCOL_LEN+1];
|
||||
int keepAlive;
|
||||
char userAgent[USER_AGENT_LEN+1];
|
||||
+ char cookie[MAX_COOKIE_LEN+1];
|
||||
@@ -139,7 +144,9 @@
|
||||
char protocolVersion[PROTOCOL_LEN+1];
|
||||
int keepAlive;
|
||||
char userAgent[USER_AGENT_LEN+1];
|
||||
+ char cookie[MAX_COOKIE_LEN+1];
|
||||
long int contentLength;
|
||||
+ char contentType[CONTENT_TYPE_LEN+1];
|
||||
char rest[BUFFER_SIZE+1];
|
||||
+ char contentType[CONTENT_TYPE_LEN+1];
|
||||
char rest[BUFFER_SIZE+1];
|
||||
};
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
--- defaults/pserv.conf.orig Tue Apr 13 18:19:55 2004
|
||||
+++ defaults/pserv.conf Wed Sep 15 15:26:34 2004
|
||||
--- defaults/pserv.conf.orig Tue Nov 9 19:03:50 2004
|
||||
+++ defaults/pserv.conf Wed Nov 24 15:00:53 2004
|
||||
@@ -1,9 +1,10 @@
|
||||
port 80
|
||||
-port 8080
|
||||
+port 80
|
||||
maxChildren 4
|
||||
-documentsPath /usr/people/multix/public_html
|
||||
+documentsPath %%PREFIX%%/www/data
|
||||
-documentsPath /usr/people/multix/public_html
|
||||
+documentsPath %%PREFIX%%/www/data
|
||||
defaultFile index.html
|
||||
secTimeout 1
|
||||
uSecTimeout 100000
|
||||
@ -13,5 +14,5 @@
|
||||
-cgiRoot /usr/people/multix/public_html/cgi-bin
|
||||
+logFile /var/log/pserv.log
|
||||
+mimeTypesFile %%PREFIX%%/etc/mime.types
|
||||
+phpFile %%LOCALBASE%%/bin/php
|
||||
+phpFile %%LOCALBASE%%/bin/php
|
||||
+cgiRoot %%PREFIX%%/www/cgi-bin
|
||||
|
Loading…
Reference in New Issue
Block a user