2009-06-15 20:31 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
+ examples/uhttpd2
+ examples/uhttpd2/umain.prg
+ examples/uhttpd2/files
+ examples/uhttpd2/files/main.js
+ examples/uhttpd2/files/main.css
+ examples/uhttpd2/uhttpd2.hbp
+ examples/uhttpd2/uwidgets.prg
+ examples/uhttpd2/carts.dbf
+ examples/uhttpd2/uhbext.prg
+ examples/uhttpd2/app.prg
+ examples/uhttpd2/socket.c
+ examples/uhttpd2/items.dbf
+ examples/uhttpd2/readme.txt
+ examples/uhttpd2/users.dbf
+ Added contribution of Mindaugas Kavaliauskas:
small-footprint multithreading http server with session model.
Read the whole description in readme.txt.
+ examples/httpsrv
+ examples/httpsrv/httpsrv.hbp
+ Somehow missed from prev.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* HTTPSRV (Micro HTTP server) cgi functions
|
||||
* uHTTPD (Micro HTTP server) cgi functions
|
||||
*
|
||||
* Copyright 2009 Francesco Saverio Giudice <info / at / fsgiudice.com>
|
||||
* www - http://www.harbour-project.org
|
||||
@@ -862,3 +862,4 @@ FUNCTION uhttpd_HGetValue( hHash, cKey )
|
||||
ENDIF
|
||||
//RETURN IIF( cKey IN hHash:Keys, hHash[ cKey ], NIL )
|
||||
RETURN xVal
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* HTTPSRV (Micro HTTP server) cookie functions
|
||||
* uHTTPD (Micro HTTP server) cookie functions
|
||||
*
|
||||
* Copyright 2009 Francesco Saverio Giudice <info / at / fsgiudice.com>
|
||||
* www - http://www.harbour-project.org
|
||||
|
||||
8
harbour/examples/httpsrv/httpsrv.hbp
Normal file
8
harbour/examples/httpsrv/httpsrv.hbp
Normal file
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# Use -DUSE_HB_INET if you want to turn on Harbour internet socket.
|
||||
# It's always on on non-Windows systems.
|
||||
|
||||
-mt -gui httpsrv.prg cgifunc.prg cookie.prg session.prg httpsrvc.c socket.c
|
||||
@@ -2,22 +2,22 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
HTTPSRV micro web server
|
||||
uHTTPD micro web server
|
||||
|
||||
Build it without GD: hbmk2 httpsrv.hbp
|
||||
Build it with GD: hbmk2 httpsrvd.hbp
|
||||
Build it without GD: hbmk2 uhttpd.hbp
|
||||
Build it with GD: hbmk2 uhttpdgd.hbp
|
||||
[ This one needs bgd.dll. Please download it from:
|
||||
http://www.libgd.org/releases/gd-latest-win32.zip ]
|
||||
|
||||
Add -DUSE_HB_INET to command line if you want to use Harbour's
|
||||
built-in socket functions.
|
||||
|
||||
To see accepted parameters run: httpsrv -?
|
||||
Parameters can also be defined using httpsrv.ini file.
|
||||
To see accepted parameters run: uhttpd -?
|
||||
Parameters can also be defined using uhttpd.ini file.
|
||||
|
||||
Before starting please build modules using: hbmk2 modules.hbp
|
||||
|
||||
Once started connect to httpsrv using:
|
||||
Once started connect to uhttpd using:
|
||||
http://localhost:8082
|
||||
to see default index page.
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* HTTPSRV (Micro HTTP server) session functions
|
||||
* uHTTPD (Micro HTTP server) session functions
|
||||
*
|
||||
* Copyright 2009 Francesco Saverio Giudice <info / at / fsgiudice.com>
|
||||
* www - http://www.harbour-project.org
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
#
|
||||
# ------------------------------------
|
||||
# Harbour Project source code:
|
||||
# HTTPSRV (Micro HTTP server) ini file
|
||||
# uHTTPD (Micro HTTP server) ini file
|
||||
#
|
||||
# Copyright 2009 Francesco Saverio Giudice <info / at / fsgiudice.com>
|
||||
# www - http://www.harbour-project.org
|
||||
# ------------------------------------
|
||||
#
|
||||
# HTTPSRV ini file (defaults are commented)
|
||||
# uHTTPD ini file (defaults are commented)
|
||||
#
|
||||
# ------------------------------------
|
||||
|
||||
@@ -73,3 +73,4 @@ start_num = 10
|
||||
#/images = $(APP_DIR)/images
|
||||
|
||||
# end
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* HTTPSRV (Micro HTTP server)
|
||||
* uHTTPD (Micro HTTP server)
|
||||
*
|
||||
* Copyright 2009 Francesco Saverio Giudice <info / at / fsgiudice.com>
|
||||
* Copyright 2008 Mindaugas Kavaliauskas (dbtopas at dbtopas.lt)
|
||||
@@ -134,7 +134,7 @@
|
||||
#stdout "Dynamic # of threads"
|
||||
#endif
|
||||
|
||||
#define APP_NAME "httpsrv"
|
||||
#define APP_NAME "uhttpd"
|
||||
#define APP_VER_NUM "0.4.4"
|
||||
#define APP_VERSION APP_VER_NUM + APP_GD_SUPPORT + APP_INET_SUPPORT + APP_DT_SUPPORT
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
#define LISTEN_PORT 8082 // differs from standard 80 port for tests in case
|
||||
// anyone has a apache/IIS installed
|
||||
#define FILE_STOP ".httpsrv.stop"
|
||||
#define FILE_STOP ".uhttpd.stop"
|
||||
#define FILE_ACCESS_LOG "logs" + HB_OSPathSeparator() + "access.log"
|
||||
#define FILE_ERROR_LOG "logs" + HB_OSPathSeparator() + "error.log"
|
||||
#define DIRECTORYINDEX_ARRAY { "index.html", "index.htm" }
|
||||
@@ -1348,7 +1348,7 @@ STATIC FUNCTION ParseRequest( cRequest )
|
||||
|
||||
// After defined all SERVER vars we can define a session
|
||||
// SESSION - sessions ID is stored as a cookie value, normally as SESSIONID var name (this can be user defined)
|
||||
t_oSession := uhttpd_SessionNew( "HTTPSRV-SESSION", s_cSessionPath )
|
||||
t_oSession := uhttpd_SessionNew( "UHTTPD-SESSION", s_cSessionPath )
|
||||
t_oSession:Start()
|
||||
|
||||
RETURN .T.
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* HTTPSRV (Micro HTTP server) [C helper functions]
|
||||
* uHTTPD (Micro HTTP server) [C helper functions]
|
||||
*
|
||||
* Copyright 2009 Francesco Saverio Giudice <info / at / fsgiudice.com>
|
||||
* Copyright 2008 Mindaugas Kavaliauskas (dbtopas at dbtopas.lt)
|
||||
@@ -2,9 +2,7 @@
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# httpsrv with GD support
|
||||
|
||||
@httpd.hbp
|
||||
@uhttpd.hbp
|
||||
-DGD_SUPPORT
|
||||
-lhbgd -lhbct
|
||||
-lbgd{win}
|
||||
Reference in New Issue
Block a user