Home
last modified time | relevance | path

Searched refs:httpd (Results 1 – 25 of 48) sorted by relevance

12

/netbsd-src/libexec/httpd/
H A Dmain.c59 usage(bozohttpd_t *httpd, char *progname) in usage() argument
61 bozowarn(httpd, "usage: %s [options] slashdir [virtualhostname]", in usage()
63 bozowarn(httpd, "options:"); in usage()
66 bozowarn(httpd, " -b\t\t\tbackground in daemon mode"); in usage()
69 bozowarn(httpd, " -C suffix handler\tadd this CGI handler " in usage()
72 bozowarn(httpd, " -c cgibin\t\tenable cgi-bin support in " in usage()
75 bozowarn(httpd, " -d\t\t\tenable debug support"); in usage()
78 bozowarn(httpd, " -E\t\t\tenable CGI support for user dirs"); in usage()
80 bozowarn(httpd, " -e\t\t\tdon't clean the environment " in usage()
83 bozowarn(httpd, " -f\t\t\tforeground in daemon mode"); in usage()
[all …]
H A Ddaemon-bozo.c100 create_pidfile(bozohttpd_t *httpd) in create_pidfile() argument
106 if (httpd->pidfile == NULL) in create_pidfile()
110 bozoerr(httpd, 1, "Failed to install pidfile handler"); in create_pidfile()
112 if ((file = fopen(httpd->pidfile, "w")) == NULL) in create_pidfile()
113 bozoerr(httpd, 1, "Failed to create pidfile '%s'", in create_pidfile()
114 httpd->pidfile); in create_pidfile()
118 pidfile_path = httpd->pidfile; in create_pidfile()
121 debug((httpd, DEBUG_FAT, "Created pid file '%s' for pid %d", in create_pidfile()
126 bozo_daemon_init(bozohttpd_t *httpd) in bozo_daemon_init() argument
132 if (!httpd->background && !httpd->foreground) in bozo_daemon_init()
[all …]
H A Dbozohttpd.c36 * bozohttpd.c: minimal httpd; provides only these features:
193 size_arrays(bozohttpd_t *httpd, bozoprefs_t *bozoprefs, size_t needed) in size_arrays() argument
199 bozoprefs->name = bozomalloc(httpd, len); in size_arrays()
200 bozoprefs->value = bozomalloc(httpd, len); in size_arrays()
203 bozoprefs->name = bozorealloc(httpd, bozoprefs->name, len); in size_arrays()
204 bozoprefs->value = bozorealloc(httpd, bozoprefs->value, len); in size_arrays()
223 bozo_set_pref(bozohttpd_t *httpd, bozoprefs_t *bozoprefs, in bozo_set_pref() argument
230 if (!size_arrays(httpd, bozoprefs, bozoprefs->size + 15)) in bozo_set_pref()
233 bozoprefs->name[i] = bozostrdup(httpd, NULL, name); in bozo_set_pref()
238 bozoprefs->value[i] = bozostrdup(httpd, NUL in bozo_set_pref()
287 parse_request(bozohttpd_t * httpd,char * in,char ** method,char ** file,char ** query,char ** proto) parse_request() argument
402 bozo_set_timeout(bozohttpd_t * httpd,bozoprefs_t * prefs,const char * target,const char * val) bozo_set_timeout() argument
438 struct bozohttpd_t *httpd = request->hr_httpd; addmerge_header() local
503 struct bozohttpd_t *httpd = request->hr_httpd; process_proto() local
574 struct bozohttpd_t *httpd = request->hr_httpd; process_method() local
609 bozo_read_request(bozohttpd_t * httpd) bozo_read_request() argument
909 mmap_and_write_part(bozohttpd_t * httpd,int fd,off_t first_byte_pos,size_t sz) mmap_and_write_part() argument
996 bozo_escape_rfc3986(bozohttpd_t * httpd,const char * url,int absolute) bozo_escape_rfc3986() argument
1061 bozohttpd_t *httpd = request->hr_httpd; handle_redirect() local
1204 bozohttpd_t *httpd = request->hr_httpd; check_remap() local
1326 bozohttpd_t *httpd = request->hr_httpd; check_virtual() local
1458 bozohttpd_t *httpd = request->hr_httpd; check_bzredirect() local
1548 bozohttpd_t *httpd = request->hr_httpd; bozo_decode_url_percent() local
1628 bozohttpd_t *httpd = request->hr_httpd; transform_request() local
1810 bozohttpd_t *httpd = request->hr_httpd; bozo_process_request() local
1950 bozohttpd_t *httpd = request->hr_httpd; bozo_check_special_files() local
1973 bozohttpd_t *httpd = request->hr_httpd; bozo_print_header() local
2019 debug__(bozohttpd_t * httpd,int level,const char * fmt,...) debug__() argument
2044 bozowarn(bozohttpd_t * httpd,const char * fmt,...) bozowarn() argument
2061 bozoerr(bozohttpd_t * httpd,int code,const char * fmt,...) bozoerr() argument
2079 bozoasprintf(bozohttpd_t * httpd,char ** str,const char * fmt,...) bozoasprintf() argument
2101 bozo_escape_html(bozohttpd_t * httpd,const char * url) bozo_escape_html() argument
2225 bozo_http_error(bozohttpd_t * httpd,int code,bozo_httpreq_t * request,const char * msg) bozo_http_error() argument
2387 bozodgetln(bozohttpd_t * httpd,int fd,ssize_t * lenp,ssize_t (* readfn)(bozohttpd_t *,int,void *,size_t)) bozodgetln() argument
2461 bozorealloc(bozohttpd_t * httpd,void * ptr,size_t size) bozorealloc() argument
2474 bozomalloc(bozohttpd_t * httpd,size_t size) bozomalloc() argument
2487 bozostrdup(bozohttpd_t * httpd,bozo_httpreq_t * request,const char * str) bozostrdup() argument
2504 bozo_init_httpd(bozohttpd_t * httpd) bozo_init_httpd() argument
2532 bozo_init_prefs(bozohttpd_t * httpd,bozoprefs_t * prefs) bozo_init_prefs() argument
2560 bozo_set_defaults(bozohttpd_t * httpd,bozoprefs_t * prefs) bozo_set_defaults() argument
2567 bozo_setup(bozohttpd_t * httpd,bozoprefs_t * prefs,const char * vhost,const char * root) bozo_setup() argument
2728 bozo_cleanup(bozohttpd_t * httpd,bozoprefs_t * prefs) bozo_cleanup() argument
[all...]
H A Dssl-bozo.c117 bozo_clear_ssl_queue(bozohttpd_t *httpd) in bozo_clear_ssl_queue() argument
124 if (httpd->nolog) in bozo_clear_ssl_queue()
127 if (httpd->logstderr || isatty(STDERR_FILENO)) { in bozo_clear_ssl_queue()
146 bozo_ssl_warn(bozohttpd_t *httpd, const char *fmt, ...) in bozo_ssl_warn() argument
151 if (!httpd->nolog) { in bozo_ssl_warn()
152 if (httpd->logstderr || isatty(STDERR_FILENO)) { in bozo_ssl_warn()
160 bozo_clear_ssl_queue(httpd); in bozo_ssl_warn()
168 bozo_ssl_err(bozohttpd_t *httpd, int code, const char *fmt, ...) in bozo_ssl_err() argument
173 if (!httpd->nolog) { in bozo_ssl_err()
174 if (httpd->logstderr || isatty(STDERR_FILENO)) { in bozo_ssl_err()
[all …]
H A Dcgi-bozo.c65 content_cgihandler(bozohttpd_t *httpd, bozo_httpreq_t *request, in content_cgihandler() argument
71 debug((httpd, DEBUG_FAT, "content_cgihandler: trying file %s", file)); in content_cgihandler()
72 map = bozo_match_content_map(httpd, file, 0); in content_cgihandler()
82 struct bozohttpd_t *httpd = request->hr_httpd; in parse_header() local
89 value = bozostrdup(httpd, request, str); in parse_header()
114 finish_cgi_output(bozohttpd_t *httpd, bozo_httpreq_t *request, int in, int nph) in finish_cgi_output() argument
128 (str = bozodgetln(httpd, in, &len, bozo_read)) != NULL) { in finish_cgi_output()
146 debug((httpd, DEBUG_OBESE, in finish_cgi_output()
149 bozo_printf(httpd, "%s %s\r\n", request->hr_proto, in finish_cgi_output()
151 bozo_flush(httpd, stdout); in finish_cgi_output()
[all …]
H A Ddir-index-bozo.c56 bozohttpd_t *httpd = request->hr_httpd; in bozo_dir_index() local
65 if (!isindex || !httpd->dir_indexing) in bozo_dir_index()
68 if (strlen(dirpath) <= strlen(httpd->index_html)) in bozo_dir_index()
71 file = bozostrdup(httpd, request, dirpath); in bozo_dir_index()
73 file[strlen(file) - strlen(httpd->index_html)] = '\0'; in bozo_dir_index()
76 debug((httpd, DEBUG_FAT, "bozo_dir_index: dirpath '%s'", dirpath)); in bozo_dir_index()
80 bozo_http_error(httpd, 403, request, in bozo_dir_index()
83 bozo_http_error(httpd, 404, request, "no file"); in bozo_dir_index()
85 bozo_http_error(httpd, 500, request, "open directory"); in bozo_dir_index()
90 bozo_printf(httpd, "%s 200 OK\r\n", request->hr_proto); in bozo_dir_index()
[all …]
H A Dprintenv.lua15 local httpd = require 'httpd'
28 httpd.write("HTTP/1.1 200 Ok\r\n")
29 httpd.write("Content-Type: text/html\r\n\r\n")
33 httpd.print([[
42 httpd.print('module version: ' .. httpd._VERSION .. '<br>')
44 httpd.print('<h2>Server Environment</h2>')
47 httpd.print(escape_html(k) .. '=' .. escape_html(v) .. '<br/>')
50 httpd.print('<h2>Request Headers</h2>')
52 httpd.print(escape_html(k) .. '=' .. escape_html(v) .. '<br/>')
56 httpd.print('<h2>Query Variables</h2>')
[all …]
H A Dlua-bozo.c57 bozohttpd_t *httpd; in httpd_instance() local
61 httpd = lua_touserdata(L, -1); in httpd_instance()
64 return httpd; in httpd_instance()
70 bozohttpd_t *httpd = httpd_instance(L); in lua_flush() local
72 bozo_flush(httpd, stdout); in lua_flush()
79 bozohttpd_t *httpd = httpd_instance(L); in lua_print() local
81 bozo_printf(httpd, "%s\r\n", lua_tostring(L, 1)); in lua_print()
88 bozohttpd_t *httpd = httpd_instance(L); in lua_read() local
97 if ((n = bozo_read(httpd, STDIN_FILENO, data, len)) >= 0) { in lua_read()
110 bozohttpd_t *httpd = httpd_instance(L); in lua_register_handler() local
[all …]
H A Dtilde-luzah-bozo.c61 bozohttpd_t *httpd = request->hr_httpd; in bozo_user_transform() local
77 debug((httpd, DEBUG_OBESE, "looking for user %s", in bozo_user_transform()
80 request->hr_user = bozostrdup(httpd, request, user); in bozo_user_transform()
93 bozo_http_error(httpd, 404, request, "no such user"); in bozo_user_transform()
97 debug((httpd, DEBUG_OBESE, "user %s dir %s/%s uid %d gid %d", in bozo_user_transform()
98 pw->pw_name, pw->pw_dir, httpd->public_html, in bozo_user_transform()
102 bozowarn(httpd, "chdir1 error: %s: %s", pw->pw_dir, in bozo_user_transform()
104 bozo_http_error(httpd, 404, request, "can't chdir to homedir"); in bozo_user_transform()
107 if (chdir(httpd->public_html) < 0) { in bozo_user_transform()
108 bozowarn(httpd, "chdir2 error: %s: %s", httpd->public_html, in bozo_user_transform()
[all …]
H A Dcontent-bozo.c221 bozo_match_content_map(bozohttpd_t *httpd, const char *name, in bozo_match_content_map() argument
228 map = search_map(httpd->dynamic_content_map, name, len); in bozo_match_content_map()
241 bozohttpd_t *httpd = request->hr_httpd; in bozo_content_type() local
244 map = bozo_match_content_map(httpd, file, 0); in bozo_content_type()
247 return httpd->consts.text_plain; in bozo_content_type()
256 bozohttpd_t *httpd = request->hr_httpd; in bozo_content_encoding() local
259 map = bozo_match_content_map(httpd, file, 0); in bozo_content_encoding()
261 return (request->hr_proto == httpd->consts.http_11) ? in bozo_content_encoding()
269 bozo_get_content_map(bozohttpd_t *httpd, const char *name) in bozo_get_content_map() argument
273 if ((map = bozo_match_content_map(httpd, name, 1)) != NULL) in bozo_get_content_map()
[all …]
H A Dauth-bozo.c54 bozohttpd_t *httpd = request->hr_httpd; in bozo_auth_check() local
75 request->hr_authrealm = bozostrdup(httpd, request, dir); in bozo_auth_check()
79 return bozo_http_error(httpd, 404, request, in bozo_auth_check()
83 debug((httpd, DEBUG_NORMAL, in bozo_auth_check()
89 return bozo_http_error(httpd, 403, request, in bozo_auth_check()
91 debug((httpd, DEBUG_NORMAL, in bozo_auth_check()
102 debug((httpd, DEBUG_NORMAL, in bozo_auth_check()
122 return bozo_http_error(httpd, 401, request, "bad auth"); in bozo_auth_check()
148 bozohttpd_t *httpd = request->hr_httpd; in bozo_auth_check_headers() local
168 return bozo_http_error(httpd, 400, request, in bozo_auth_check_headers()
[all …]
H A DMakefile29 LINKS= ${BINDIR}/bozohttpd ${BINDIR}/httpd
31 MLINKS+=bozohttpd.8 httpd.8
/netbsd-src/external/mpl/dhcp/bind/dist/lib/isc/
H A Dhttpd.c215 reset_client(isc_httpd_t *httpd);
239 maybe_destroy_httpd(isc_httpd_t *httpd) { in maybe_destroy_httpd() argument
240 if (isc_refcount_decrement(&httpd->references) == 1) { in maybe_destroy_httpd()
241 destroy_httpd(httpd); in maybe_destroy_httpd()
258 destroy_httpd(isc_httpd_t *httpd) { in destroy_httpd() argument
261 REQUIRE(VALID_HTTPD(httpd)); in destroy_httpd()
263 httpdmgr = httpd->mgr; in destroy_httpd()
272 ISC_LIST_UNLINK(httpdmgr->running, httpd, link); in destroy_httpd()
275 httpd->magic = 0; in destroy_httpd()
276 isc_refcount_destroy(&httpd->references); in destroy_httpd()
[all …]
/netbsd-src/external/mpl/bind/dist/lib/isc/
H A Dhttpd.c1 /* $NetBSD: httpd.c,v 1.10 2025/01/26 16:25:37 christos Exp $ */
24 #include <isc/httpd.h>
165 isc_httpd_t *httpd;
209 httpd_free(isc_httpd_t *httpd);
368 process_request(isc_httpd_t *httpd, size_t last_len) { in value_match()
380 pret = phr_parse_request(httpd->recvbuf, httpd->recvlen, &method, in process_request()
382 &httpd->minor_version, headers, &num_headers, in process_request()
399 httpd->consume = pret; in process_request()
406 httpd in process_request()
139 isc_httpd_t *httpd; global() member
375 process_request(isc_httpd_t * httpd,size_t last_len) process_request() argument
544 isc_httpd_t *httpd = (isc_httpd_t *)arg; httpd_reset() local
579 isc__httpd_sendreq_new(isc_httpd_t * httpd) isc__httpd_sendreq_new() argument
604 isc_httpd_t *httpd = (isc_httpd_t *)arg; httpd_put() local
628 isc_httpd_t *httpd = NULL; new_httpd() local
687 render_404(const isc_httpd_t * httpd,const isc_httpdurl_t * urlinfo,void * arg,unsigned int * retcode,const char ** retmsg,const char ** mimetype,isc_buffer_t * b,isc_httpdfree_t ** freecb,void ** freecb_args) render_404() argument
708 render_500(const isc_httpd_t * httpd,const isc_httpdurl_t * urlinfo,void * arg,unsigned int * retcode,const char ** retmsg,const char ** mimetype,isc_buffer_t * b,isc_httpdfree_t ** freecb,void ** freecb_args) render_500() argument
783 prepare_response(isc_httpdmgr_t * mgr,isc_httpd_t * httpd,isc_httpd_sendreq_t ** reqp) prepare_response() argument
925 isc_httpd_t *httpd = NULL; httpd_request() local
1003 isc_httpd_t *httpd; isc_httpdmgr_shutdown() local
1029 httpd_response(isc_httpd_t * httpd,isc_httpd_sendreq_t * req) httpd_response() argument
1074 isc_httpd_t *httpd = req->httpd; httpd_senddone() local
1149 isc_httpd_if_modified_since(const isc_httpd_t * httpd) isc_httpd_if_modified_since() argument
[all...]
/netbsd-src/libexec/httpd/lua/
H A Dglue.c55 bozohttpd_t *httpd; in l_new() local
57 httpd = lua_newuserdata(L, sizeof(*httpd)); in l_new()
58 (void) memset(httpd, 0x0, sizeof(*httpd)); in l_new()
66 bozohttpd_t *httpd; in l_init_httpd() local
68 httpd = lua_touserdata(L, 1); in l_init_httpd()
69 lua_pushnumber(L, bozo_init_httpd(httpd)); in l_init_httpd()
77 bozohttpd_t *httpd; in l_init_prefs() local
82 httpd = lua_touserdata(L, 1); in l_init_prefs()
83 (void) bozo_init_prefs(httpd, prefs); in l_init_prefs()
91 bozohttpd_t *httpd; in l_bozo_set_pref() local
[all …]
H A Dbozo.lua71 httpd = bozohttpd.new()
72 bozohttpd.init_httpd(httpd)
78 bozohttpd.set_pref(httpd, prefs, "port number", options.portnum)
81 bozohttpd.set_pref(httpd, prefs, "background", options.background)
84 bozohttpd.set_pref(httpd, prefs, "numeric", "true")
87 bozohttpd.set_pref(httpd, prefs, "log to stderr", "true")
90 bozohttpd.set_pref(httpd, prefs, "foreground", "true")
93 bozohttpd.set_pref(httpd, prefs, "trusted referal", "true")
98 bozohttpd.dynamic_mime(httpd, suffix, type, s1, s2)
101 bozohttpd.set_pref(httpd, prefs, "server software", options.serversw)
[all …]
/netbsd-src/external/mpl/dhcp/bind/dist/lib/isc/include/isc/
H A Dhttpd.h73 isc_httpd_response(isc_httpd_t *httpd);
76 isc_httpd_addheader(isc_httpd_t *httpd, const char *name, const char *val);
79 isc_httpd_addheaderuint(isc_httpd_t *httpd, const char *name, int val);
82 isc_httpd_endheaders(isc_httpd_t *httpd);
/netbsd-src/external/bsd/libpcap/dist/testprogs/
H A Dvisopts.py292 httpd = MySocketServer(("localhost", 0), Handler)
293 print "open this link: http://localhost:%d/expr1.html" % (httpd.server_address[1])
295 httpd.serve_forever()
/netbsd-src/lib/lua/bozohttpd/
H A DMakefile6 ${.CURDIR}/../../../libexec/httpd/libbozohttpd
8 EXTDIST= ${.CURDIR}/../../../libexec/httpd
/netbsd-src/tests/lib/librumphijack/
H A Dt_tcpip.sh44 /usr/libexec/httpd -P ./httpd.pid -b -s $(atf_get_srcdir)
63 if [ -f httpd.pid ]; then
65 rm -f httpd.pid
/netbsd-src/external/mpl/bind/dist/lib/isc/include/isc/
H A Dhttpd.h1 /* $NetBSD: httpd.h,v 1.8 2025/01/26 16:25:41 christos Exp $ */
33 const isc_httpd_t *httpd, const isc_httpdurl_t *urlinfo, void *arg,
62 isc_httpd_if_modified_since(const isc_httpd_t *httpd);
/netbsd-src/external/apache2/llvm/dist/llvm/tools/sancov/
H A Dcoverage-report-server.py197 httpd = socketserver.TCPServer((args.host, args.port), ServerHandler)
200 httpd.serve_forever()
203 httpd.server_close()
/netbsd-src/external/apache2/llvm/dist/clang/tools/scan-view/bin/
H A Dscan-view79 httpd = ScanView.create_server((options.host, port),
81 httpd.serve_forever()
/netbsd-src/usr.bin/sys_info/
H A Dsys_info.sh113 v=$(run "${destdir}/usr/libexec/httpd -G")
116 …run "strings -a ${destdir}/usr/libexec/httpd | awk -F/ '\$1 == \"bozohttpd\" && NF == 2 { print \…
/netbsd-src/libexec/
H A DMakefile7 comsat fingerd ftpd getty httpd identd ld.aout_so \

12