aboutsummaryrefslogtreecommitdiff
path: root/networking/httpd.c
Commit message (Collapse)AuthorAgeFilesLines
* - pass "Accept:" and "Accept-Language:" header to CGI scripts (Alina ↵Gravatar Bernhard Reutner-Fischer2008-09-011-0/+12
| | | | | | | | | | | | | | | | | | Friedrichsen) Alina writes: With this patch the BusyBox httpd pass the "Accept:" and "Accept-Language:" header by the environment variables to the CGI-Script, so this can make Content Negotiation to deliver the page in the language, which was selected by the user in the browser settings, and/or serve the XHTML page with the right MIME-Type application/xhtml+xml to user agents which support it und text/html which don't. (Needed e.g. for OpenWrt LuCI.) Signed-off-by: Alina Friedrichsen <x-alina at gmx dot net>
* libbb: [x]fopen_for_{read,write} introduced and used.Gravatar Denis Vlasenko2008-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (by Valdimir) function old new delta config_open2 - 41 +41 config_read 507 542 +35 find_pair 169 187 +18 fopen_for_write - 14 +14 fopen_for_read - 14 +14 find_main 406 418 +12 xfopen_for_write - 10 +10 xfopen_for_read - 10 +10 popstring 134 140 +6 parse_inittab 396 401 +5 next_token 923 928 +5 pack_gzip 1659 1661 +2 bb__parsespent 117 119 +2 fallbackSort 1719 1717 -2 evalvar 1376 1374 -2 qrealloc 36 33 -3 ... ... ... ... singlemount 4579 4569 -10 process_stdin 443 433 -10 patch_main 1111 1101 -10 ifupdown_main 2175 2165 -10 file_action_grep 90 80 -10 uuidcache_init 649 637 -12 hush_main 797 785 -12 read_config 230 217 -13 dpkg_main 3835 3820 -15 read_line_input 3134 3110 -24 sysctl_main 232 203 -29 config_open 40 10 -30 WARN_BAD_LINE 44 - -44 login_main 1714 1575 -139 ------------------------------------------------------------------------------ (add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737) Total: -563 bytes
* - first pass to unify/cleanup uid handling (-236b)Gravatar Bernhard Reutner-Fischer2008-07-211-3/+1
| | | | This needs further love, alot of love.. Tito?
* - fix spellingGravatar Bernhard Reutner-Fischer2008-07-211-1/+1
|
* httpd: add Hopedir directive specially forGravatar Denis Vlasenko2008-07-201-4/+15
| | | | | | | | | (and by) walter harms <wharms AT bfs.de>; fix silly double-parse bug added in 21412. function old new delta parse_conf 1532 1576 +44
* *: rename ATTRIBUTE_XXX to just XXX.Gravatar Denis Vlasenko2008-07-051-12/+12
|
* httpd: fix authenticationGravatar Denis Vlasenko2008-06-131-2/+3
|
* httpd: fix bugs in authentication (by Peter Korsgaard <jacmet ATuclibc.org>)Gravatar Denis Vlasenko2008-06-131-46/+52
| | | | | | | | | we were accepting empty username; also we were always checking dummy user:passwd pair ":" if user gave us wrong one. function old new delta check_user_passwd 338 319 -19
* htppd: lots of variable/function renaming in config file parsing.Gravatar Denis Vlasenko2008-06-131-123/+102
| | | | | | | | | | | | | | fixed a bug where we trashed config file's name; otherwise, should not have any real behavioral changes. function old new delta check_user_passwd - 338 +338 handle_incoming_and_exit 2661 2649 -12 parse_conf 1650 1536 -114 checkPerm 338 - -338 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/2 up/down: 338/-464) Total: -126 bytes
* make pw_encrypt() return malloc'ed string.Gravatar Denis Vlasenko2008-06-121-4/+4
| | | | | | | text data bss dec hex filename 759802 604 6684 767090 bb472 busybox_old 759804 604 6676 767084 bb46c busybox_unstripped
* uclibc insists on having 70k static buffer for crypt.Gravatar Denis Vlasenko2008-06-121-2/+2
| | | | | | | | | | | | For bbox it's not acceptable. Roll our own des and md5 crypt implementation. Against older uclibc: text data bss dec hex filename 759945 604 6684 767233 bb501 busybox_old 759766 604 6684 767054 bb44e busybox_unstripped so, we still save on code size.
* - use STD*_FILENO some more. No object-code changesGravatar Bernhard Reutner-Fischer2008-05-191-12/+12
|
* httpd: fix obscure case when user runs httpd -i from command line for testing.Gravatar Denis Vlasenko2008-05-181-1/+8
| | | | | | | | | | | | (fixes bug 3334) function old new delta httpd_main 743 757 +14 handle_incoming_and_exit 2657 2669 +12 log_and_exit 75 43 -32 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 26/-32) Total: -6 bytes
* more of -Wall fixes from Cristian Ionescu-Idbohrn.Gravatar Denis Vlasenko2008-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some are fixing real bugs. function old new delta syslogd_main 938 958 +20 get_signum 136 143 +7 obj_load 777 782 +5 recv_from_to 210 214 +4 get_next_block 1795 1799 +4 display_topmem_process_list 1117 1121 +4 logread_main 484 487 +3 buffer_fill_and_print 73 76 +3 kill_main 687 689 +2 ll_remember_index 240 241 +1 do_stats 452 453 +1 if_readconf 166 165 -1 display_process_list 1192 1191 -1 run_applet_and_exit 507 505 -2 print_signames 33 31 -2 parse_one_line 1092 1090 -2 find_out_spec 57 55 -2 add_ksymoops_symbols 421 419 -2 ash_main 1407 1402 -5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 11/8 up/down: 54/-17) Total: 37 bytes
* httpd: fix several bugs triggering by realtive path in -h DIR.Gravatar Denis Vlasenko2008-05-071-68/+75
| | | | | | | | | | function old new delta handle_incoming_and_exit 2657 2659 +2 send_cgi_and_exit 869 862 -7 parse_conf 1647 1626 -21 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 2/-28) Total: -26 bytes
* httpd: restore HUP, CHLD and PIPE to SIG_DFL prior to execing CGI.Gravatar Denis Vlasenko2008-05-071-0/+7
| | | | | | function old new delta send_cgi_and_exit 856 869 +13
* fix a few stray unguarded strdup'sGravatar Denis Vlasenko2008-03-281-9/+7
|
* inetd: use change_identity().Gravatar Denis Vlasenko2008-03-201-4/+2
| | | | | | | | | | | | | libbb: shrink our internal initgroups(). httpd: remove stray 'else' and 'index_page = "index.html"' function old new delta httpd_main 750 743 -7 inetd_main 2033 2011 -22 bb_internal_initgroups 251 228 -23 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-52) Total: -52 bytes
* httpd: small fixlet for POST upload - skipGravatar Denis Vlasenko2008-03-171-1/+1
| | | | | whitespace between "Content-length:" and number
* *: fix fallout from -Wunused-parameterGravatar Denis Vlasenko2008-03-171-2/+11
| | | | | | | | | | | | | | | | | | function old new delta bbunpack 358 366 +8 passwd_main 1070 1072 +2 handle_incoming_and_exit 2651 2653 +2 getpty 88 86 -2 script_main 975 972 -3 inetd_main 2036 2033 -3 dname_enc 377 373 -4 make_new_session 474 462 -12 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/5 up/down: 12/-24) Total: -12 bytes text data bss dec hex filename 797429 658 7428 805515 c4a8b busybox_old 797417 658 7428 805503 c4a7f busybox_unstripped
* *: add -Wunused-parameter; fix resulting breakageGravatar Denis Vlasenko2008-03-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
* libbb: introduse and use signal_[no_]SA_RESTART_empty_mask and sigaction_setGravatar Denis Vlasenko2008-03-121-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | signal_SA_RESTART_empty_mask - 65 +65 signal_no_SA_RESTART_empty_mask - 54 +54 dd_main 1325 1369 +44 sigaction_set - 19 +19 dname_enc 373 377 +4 UNSPEC_print 64 66 +2 setsignal 296 294 -2 bb_signals_recursive 95 92 -3 bb_askpass 367 361 -6 inetd_main 1810 1797 -13 rx_main 912 883 -29 sigdelset 32 - -32 __sigdelset 32 - -32 __GI_sigdelset 32 - -32 sighup_handler 84 37 -47 arping_main 1844 1797 -47 fsck_main 1869 1807 -62 run_list 1917 1844 -73 vlock_main 492 409 -83 progressmeter 883 798 -85 handle_incoming_and_exit 2737 2651 -86 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 3/12 up/down: 188/-632) Total: -444 bytes
* httpd: fix breakage introduced by "support for I:index.xml"Gravatar Denis Vlasenko2008-02-271-0/+1
|
* *: add optimization barrier to all "G trick" locationsGravatar Denis Vlasenko2008-02-271-1/+1
|
* httpd: "HEAD" support. Closes bug 1530.Gravatar Denis Vlasenko2008-02-211-26/+36
| | | | | | | | | | | | | send_file_and_exit 629 645 +16 static.request_HEAD - 5 +5 handle_incoming_and_exit 2732 2737 +5 send_headers 594 597 +3 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/0 up/down: 29/0) Total: 29 bytes text data bss dec hex filename 796283 740 7484 804507 c469b busybox_old 796312 740 7484 804536 c46b8 busybox_unstripped
* init: make it NOMMU-capableGravatar Denis Vlasenko2008-02-191-1/+1
| | | | | httpd: trivial compile fix
* *: more readable handling of pipe fds. No code changes.Gravatar Denis Vlasenko2008-02-161-4/+4
|
* random s/short/int/Gravatar Denis Vlasenko2008-02-161-2/+3
| | | | | | | | | add_cmd 1189 1190 +1 xconnect_ftpdata 118 117 -1 data_align 86 84 -2 process_files 2101 2096 -5 forkexec 1345 1334 -11
* httpd: fix bug where we did chdir("") if CGI path had only one "/".Gravatar Denis Vlasenko2008-02-111-20/+22
| | | | | | | httpd: fix bug 2004: wrong argv when interpreter is invoked +8 bytes growth
* httpd: add a bit of error logging; a few code simplifications. +29 bytes.Gravatar Denis Vlasenko2008-02-081-7/+11
|
* - be C99 friendly. Anonymous unions are a GNU extension. This change isGravatar Bernhard Reutner-Fischer2008-01-291-11/+11
| | | | | size-neutral WRT -std=gnu99 and fixes several compilation errors for strict C99 mode.
* libbb: introduce and use safe_waitpid (loops in EINTR)Gravatar Denis Vlasenko2008-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | *: use more approproate (shorter) versions of wait() function old new delta safe_waitpid - 48 +48 wait_any_nohang - 17 +17 send_tree 365 369 +4 processorstop 432 435 +3 text_yank 110 108 -2 make_human_readable_str 202 200 -2 crond_main 1368 1366 -2 handle_sigchld 49 43 -6 reapchild 166 159 -7 custom 260 250 -10 checkscript 191 177 -14 wait_nohang 17 - -17 wait_pid 43 - -43 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 2/7 up/down: 72/-103) Total: -31 bytes
* httpd: support for "I:index.xml" syntax (Peter Korsgaard <jacmet@uclibc.org>)Gravatar Denis Vlasenko2007-12-291-2/+11
| | | | | | | | | | function old new delta parse_conf 1481 1507 +26 handle_incoming_and_exit 2650 2663 +13 httpd_main 749 759 +10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 49/0) Total: 49 bytes
* httpd: fix trivial bug (spotted by Alex Landau)Gravatar Denis Vlasenko2007-10-211-1/+1
|
* httpd: free big buffer after use; improve grep-ability of 'headers' variableGravatar Denis Vlasenko2007-10-181-16/+17
|
* xatonum.h: add commentGravatar Denis Vlasenko2007-10-181-64/+200
| | | | | | | lineedit: fix typo in comment httpd: support for proxying connection to other http server (by Alex Landau <landau_alex@yahoo.com>)
* remove trailing whitespaceGravatar Denis Vlasenko2007-10-141-4/+4
|
* httpd: fix bug where we were trying to read more POSTDATA than content-lengthGravatar Denis Vlasenko2007-10-141-0/+11
|
* add -fvisibility=hidden to CC flags, mark XXX_main functionsGravatar Denis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.Gravatar Denis Vlasenko2007-10-011-1/+1
| | | | | 263 bytes saved.
* httpd: trivial simplificationGravatar Denis Vlasenko2007-09-281-4/+6
|
* introduce safe_poll (fixes a problem in top)Gravatar Denis Vlasenko2007-09-271-5/+1
| | | | | | | | | | | | | | | | | | | | function old new delta safe_poll - 77 +77 svlogd_main 1470 1466 -4 zcip_main 1530 1524 -6 forkexec 1345 1338 -7 decode_format_string 795 788 -7 collect_blk 474 467 -7 buffer_pread 540 532 -8 tftp 1182 1172 -10 microcom_main 763 749 -14 arpping 441 424 -17 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/9 up/down: 77/-80) Total: -3 bytes text data bss dec hex filename 770162 1034 10404 781600 bed20 busybox_old 770158 1034 10404 781596 bed1c busybox_unstripped
* httpd: small auth and IPv6 fixes (Kim B. Heino <Kim.Heino@bluegiga.com>)Gravatar Denis Vlasenko2007-09-251-1/+8
|
* httpd: simplify CGI i/o loop. -200 bytes.Gravatar Denis Vlasenko2007-09-231-168/+183
|
* httpd: optional support for partial downloadsGravatar Denis Vlasenko2007-09-211-16/+103
|
* httpd: do not clear environmentGravatar Denis Vlasenko2007-09-151-1/+7
| | | | | mount: mount helpers support (by Vladimir Dronnikov <dronnikov@gmail.ru>)
* httpd: fix buglet in hex conversion. Remove alloca NULL checksGravatar Denis Vlasenko2007-08-211-20/+16
| | | | | | (never happens, app just crashes if stack overflows) svlogd: cosmetic messages and style fixes
* httpd: add optional support for error pages Gravatar Denis Vlasenko2007-08-211-85/+153
| | | | | (by Pierre Metras <genepi@sympatico.ca>)
* removed stray debugging commentsGravatar Denis Vlasenko2007-08-191-4/+0
|
* httpd: explain IP/mask parsing, and simplify it a bit.Gravatar Denis Vlasenko2007-08-191-33/+48
| | | | | | | | | | parse_conf 1258 1247 -11 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-11) Total: -11 bytes text data bss dec hex filename 772602 1058 11092 784752 bf970 busybox_old 772594 1058 11092 784744 bf968 busybox_unstripped