- update CHANGES with recent changes

- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)
This commit is contained in:
mrg 2014-01-02 08:21:38 +00:00
parent 47379f4665
commit d1b43391bd
14 changed files with 34 additions and 26 deletions

View File

@ -1,6 +1,9 @@
$eterna: CHANGES,v 1.78 2011/11/18 01:25:11 mrg Exp $
changes since bozohttpd 20111118:
o update a few content types
o add support for directly calling lua scripts to handle
processes, from mbalmer@netbsd.org
o properly escape generated HTML
o add authentication for redirections, from martin@netbsd.org
o handle chained ssl certifications, from elric@netbsd.org

View File

@ -1,9 +1,9 @@
/* $NetBSD: auth-bozo.c,v 1.11 2013/10/12 18:46:12 mbalmer Exp $ */
/* $NetBSD: auth-bozo.c,v 1.12 2014/01/02 08:21:38 mrg Exp $ */
/* $eterna: auth-bozo.c,v 1.17 2011/11/18 09:21:15 mrg Exp $ */
/*
* Copyright (c) 1997-2011 Matthew R. Green
* Copyright (c) 1997-2014 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -1,9 +1,9 @@
/* $NetBSD: bozohttpd.c,v 1.44 2013/10/12 18:46:12 mbalmer Exp $ */
/* $NetBSD: bozohttpd.c,v 1.45 2014/01/02 08:21:38 mrg Exp $ */
/* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */
/*
* Copyright (c) 1997-2013 Matthew R. Green
* Copyright (c) 1997-2014 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -109,7 +109,7 @@
#define INDEX_HTML "index.html"
#endif
#ifndef SERVER_SOFTWARE
#define SERVER_SOFTWARE "bozohttpd/20130711"
#define SERVER_SOFTWARE "bozohttpd/20140102"
#endif
#ifndef DIRECT_ACCESS_FILE
#define DIRECT_ACCESS_FILE ".bzdirect"

View File

@ -1,9 +1,9 @@
/* $NetBSD: bozohttpd.h,v 1.30 2013/10/12 17:24:07 mbalmer Exp $ */
/* $NetBSD: bozohttpd.h,v 1.31 2014/01/02 08:21:38 mrg Exp $ */
/* $eterna: bozohttpd.h,v 1.39 2011/11/18 09:21:15 mrg Exp $ */
/*
* Copyright (c) 1997-2013 Matthew R. Green
* Copyright (c) 1997-2014 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -1,9 +1,9 @@
/* $NetBSD: cgi-bozo.c,v 1.23 2013/10/12 18:46:12 mbalmer Exp $ */
/* $NetBSD: cgi-bozo.c,v 1.24 2014/01/02 08:21:38 mrg Exp $ */
/* $eterna: cgi-bozo.c,v 1.40 2011/11/18 09:21:15 mrg Exp $ */
/*
* Copyright (c) 1997-2013 Matthew R. Green
* Copyright (c) 1997-2014 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -1,9 +1,9 @@
/* $NetBSD: content-bozo.c,v 1.8 2013/07/11 07:44:19 mrg Exp $ */
/* $NetBSD: content-bozo.c,v 1.9 2014/01/02 08:21:38 mrg Exp $ */
/* $eterna: content-bozo.c,v 1.17 2011/11/18 09:21:15 mrg Exp $ */
/*
* Copyright (c) 1997-2013 Matthew R. Green
* Copyright (c) 1997-2014 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -1,9 +1,9 @@
/* $NetBSD: daemon-bozo.c,v 1.15 2011/11/18 09:51:31 mrg Exp $ */
/* $NetBSD: daemon-bozo.c,v 1.16 2014/01/02 08:21:38 mrg Exp $ */
/* $eterna: daemon-bozo.c,v 1.24 2011/11/18 09:21:15 mrg Exp $ */
/*
* Copyright (c) 1997-2011 Matthew R. Green
* Copyright (c) 1997-2014 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -1,9 +1,9 @@
/* $NetBSD: dir-index-bozo.c,v 1.18 2013/10/12 18:46:12 mbalmer Exp $ */
/* $NetBSD: dir-index-bozo.c,v 1.19 2014/01/02 08:21:38 mrg Exp $ */
/* $eterna: dir-index-bozo.c,v 1.20 2011/11/18 09:21:15 mrg Exp $ */
/*
* Copyright (c) 1997-2013 Matthew R. Green
* Copyright (c) 1997-2014 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -1,4 +1,4 @@
/* $NetBSD: lua-bozo.c,v 1.8 2013/11/19 07:51:56 mbalmer Exp $ */
/* $NetBSD: lua-bozo.c,v 1.9 2014/01/02 08:21:38 mrg Exp $ */
/*
* Copyright (c) 2013 Marc Balmer <marc@msys.ch>
@ -32,6 +32,8 @@
#ifndef NO_LUA_SUPPORT
#include <sys/param.h>
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
@ -180,17 +182,17 @@ void
bozo_add_lua_map(bozohttpd_t *httpd, const char *prefix, const char *script)
{
lua_state_map_t *map;
char *cwd, *path;
map = bozomalloc(httpd, sizeof(lua_state_map_t));
map->prefix = bozostrdup(httpd, prefix);
if (*script == '/')
map->script = bozostrdup(httpd, script);
else {
cwd = getwd(NULL);
char cwd[MAXPATHLEN], *path;
getcwd(cwd, sizeof(cwd) - 1);
asprintf(&path, "%s/%s", cwd, script);
map->script = path;
free(cwd);
}
map->L = luaL_newstate();
if (map->L == NULL)

View File

@ -1,10 +1,10 @@
/* $NetBSD: main.c,v 1.6 2013/10/12 17:24:07 mbalmer Exp $ */
/* $NetBSD: main.c,v 1.7 2014/01/02 08:21:38 mrg Exp $ */
/* $eterna: main.c,v 1.6 2011/11/18 09:21:15 mrg Exp $ */
/* from: eterna: bozohttpd.c,v 1.159 2009/05/23 02:14:30 mrg Exp */
/*
* Copyright (c) 1997-2011 Matthew R. Green
* Copyright (c) 1997-2014 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -1,3 +1,5 @@
-- $NetBSD: printenv.lua,v 1.2 2014/01/02 08:21:38 mrg Exp $
-- this small Lua script demonstrates the use of Lua in (bozo)httpd
-- it will simply output the "environment"

View File

@ -8,7 +8,8 @@ SRCS= bozohttpd-small.c content-bozo-small.c
LEAN_IFDEF_FLAGS= -UDEBUG -DNO_USER_SUPPORT \
-DNO_CGIBIN_SUPPORT -DNO_DIRINDEX_SUPPORT \
-DNO_DAEMON_MODE -DNO_DYNAMIC_CONTENT \
-DNO_SSL_SUPPORT -UDO_HTPASSWD
-DNO_SSL_SUPPORT -UDO_HTPASSWD \
-DNO_LUA_SUPPORT
CFLAGS= -I$(.CURDIR)/.. ${LEAN_IFDEF_FLAGS}

View File

@ -1,9 +1,9 @@
/* $NetBSD: ssl-bozo.c,v 1.15 2012/03/14 23:47:19 joerg Exp $ */
/* $NetBSD: ssl-bozo.c,v 1.16 2014/01/02 08:21:38 mrg Exp $ */
/* $eterna: ssl-bozo.c,v 1.15 2011/11/18 09:21:15 mrg Exp $ */
/*
* Copyright (c) 1997-2011 Matthew R. Green
* Copyright (c) 1997-2014 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -1,9 +1,9 @@
/* $NetBSD: tilde-luzah-bozo.c,v 1.9 2011/11/18 09:51:31 mrg Exp $ */
/* $NetBSD: tilde-luzah-bozo.c,v 1.10 2014/01/02 08:21:38 mrg Exp $ */
/* $eterna: tilde-luzah-bozo.c,v 1.16 2011/11/18 09:21:15 mrg Exp $ */
/*
* Copyright (c) 1997-2011 Matthew R. Green
* Copyright (c) 1997-2014 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without