diff options
| author | mrg <mrg@NetBSD.org> | 2014-01-02 08:21:38 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2014-01-02 08:21:38 +0000 |
| commit | 7a5c6c8bf340db9aad085cbf4c9e5039e6bd3afa (patch) | |
| tree | 87b023bd1c9115101ce355135bbb7fe78fd9d572 /libexec/httpd | |
| parent | 82bc6e733c8fff63ad79d49aacc86844986bcc94 (diff) | |
- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)
Diffstat (limited to 'libexec/httpd')
| -rw-r--r-- | libexec/httpd/CHANGES | 3 | ||||
| -rw-r--r-- | libexec/httpd/auth-bozo.c | 4 | ||||
| -rw-r--r-- | libexec/httpd/bozohttpd.c | 6 | ||||
| -rw-r--r-- | libexec/httpd/bozohttpd.h | 4 | ||||
| -rw-r--r-- | libexec/httpd/cgi-bozo.c | 4 | ||||
| -rw-r--r-- | libexec/httpd/content-bozo.c | 4 | ||||
| -rw-r--r-- | libexec/httpd/daemon-bozo.c | 4 | ||||
| -rw-r--r-- | libexec/httpd/dir-index-bozo.c | 4 | ||||
| -rw-r--r-- | libexec/httpd/lua-bozo.c | 10 | ||||
| -rw-r--r-- | libexec/httpd/main.c | 4 | ||||
| -rw-r--r-- | libexec/httpd/printenv.lua | 2 | ||||
| -rw-r--r-- | libexec/httpd/small/Makefile | 3 | ||||
| -rw-r--r-- | libexec/httpd/ssl-bozo.c | 4 | ||||
| -rw-r--r-- | libexec/httpd/tilde-luzah-bozo.c | 4 |
14 files changed, 34 insertions, 26 deletions
diff --git a/libexec/httpd/CHANGES b/libexec/httpd/CHANGES index 10b00442a73..585dc5d6175 100644 --- a/libexec/httpd/CHANGES +++ b/libexec/httpd/CHANGES @@ -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 diff --git a/libexec/httpd/auth-bozo.c b/libexec/httpd/auth-bozo.c index 88e8d144082..a7690cec28f 100644 --- a/libexec/httpd/auth-bozo.c +++ b/libexec/httpd/auth-bozo.c @@ -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 diff --git a/libexec/httpd/bozohttpd.c b/libexec/httpd/bozohttpd.c index 1a22144c598..72be0e87c83 100644 --- a/libexec/httpd/bozohttpd.c +++ b/libexec/httpd/bozohttpd.c @@ -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" diff --git a/libexec/httpd/bozohttpd.h b/libexec/httpd/bozohttpd.h index 13c528b1777..33c42b5e6ad 100644 --- a/libexec/httpd/bozohttpd.h +++ b/libexec/httpd/bozohttpd.h @@ -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 diff --git a/libexec/httpd/cgi-bozo.c b/libexec/httpd/cgi-bozo.c index fc1b5c04b70..b24304eb3bf 100644 --- a/libexec/httpd/cgi-bozo.c +++ b/libexec/httpd/cgi-bozo.c @@ -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 diff --git a/libexec/httpd/content-bozo.c b/libexec/httpd/content-bozo.c index 42f3ae32403..725642d2bed 100644 --- a/libexec/httpd/content-bozo.c +++ b/libexec/httpd/content-bozo.c @@ -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 diff --git a/libexec/httpd/daemon-bozo.c b/libexec/httpd/daemon-bozo.c index 0c0c6093f1b..ff3109af3f7 100644 --- a/libexec/httpd/daemon-bozo.c +++ b/libexec/httpd/daemon-bozo.c @@ -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 diff --git a/libexec/httpd/dir-index-bozo.c b/libexec/httpd/dir-index-bozo.c index c5d0642074e..86ea8378f73 100644 --- a/libexec/httpd/dir-index-bozo.c +++ b/libexec/httpd/dir-index-bozo.c @@ -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 diff --git a/libexec/httpd/lua-bozo.c b/libexec/httpd/lua-bozo.c index 11eab386f3e..76a8ecd385e 100644 --- a/libexec/httpd/lua-bozo.c +++ b/libexec/httpd/lua-bozo.c @@ -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) diff --git a/libexec/httpd/main.c b/libexec/httpd/main.c index bd8c783dc30..26e4197b4eb 100644 --- a/libexec/httpd/main.c +++ b/libexec/httpd/main.c @@ -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 diff --git a/libexec/httpd/printenv.lua b/libexec/httpd/printenv.lua index 5ef8305293d..5b0fdf9c66a 100644 --- a/libexec/httpd/printenv.lua +++ b/libexec/httpd/printenv.lua @@ -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" diff --git a/libexec/httpd/small/Makefile b/libexec/httpd/small/Makefile index dd5795600bc..e3221950038 100644 --- a/libexec/httpd/small/Makefile +++ b/libexec/httpd/small/Makefile @@ -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} diff --git a/libexec/httpd/ssl-bozo.c b/libexec/httpd/ssl-bozo.c index 0d52f4d9d29..1d77df1f252 100644 --- a/libexec/httpd/ssl-bozo.c +++ b/libexec/httpd/ssl-bozo.c @@ -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 diff --git a/libexec/httpd/tilde-luzah-bozo.c b/libexec/httpd/tilde-luzah-bozo.c index abb8b7d046b..7b272f1f1a2 100644 --- a/libexec/httpd/tilde-luzah-bozo.c +++ b/libexec/httpd/tilde-luzah-bozo.c @@ -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 |
