aboutsummaryrefslogtreecommitdiff
path: root/networking/httpd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix build breakage found by randconfigDenys Vlasenko2012-04-201-1/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: emit correct content length on range requests past the end. Closes 4952Rob Walker2012-04-031-1/+1
| | | | | Signed-off-by: Rob Walker <rwalker@codeaurora.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: make byte ranges which start at 0 work too. Closes 4766Denys Vlasenko2012-02-191-6/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: fix sendfile of files larger than 2 Gb. Closes 4754Denys Vlasenko2012-02-041-1/+1
| | | | | | | | When built with "sendfile" support, httpd was unable to send large files (>2 GB) in one single connection, terminating it before the full file has been sent. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: fix MD5-encrypted-in-httpd.conf password logicDenys Vlasenko2012-02-011-23/+27
| | | | | | | function old new delta check_user_passwd 467 492 +25 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: don't drop/abuse QUERY_STRING when /cgi-bin/index.cgi is usedDenys Vlasenko2011-12-191-8/+18
| | | | | Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: remove is_directory's argument which is always NULLDenys Vlasenko2011-12-181-3/+3
| | | | | | | | | | | | function old new delta send_cgi_and_exit 892 890 -2 ln_main 447 445 -2 handle_incoming_and_exit 2784 2780 -4 is_directory 66 59 -7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/6 up/down: 2/-19) Total: -15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: remove redundant NULL assignment and save one strrchr. -8 bytesDenys Vlasenko2011-12-181-8/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: fix /../ sanitization (had one extra semicolon). rewrote itDenys Vlasenko2011-12-161-13/+19
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: small fixes to previous changePascal Bellard2011-11-291-7/+11
| | | | | Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: make it possible to use system passwords for authPascal Bellard2011-11-291-28/+147
| | | | | | | | | function old new delta check_user_passwd 320 467 +147 httpd_main 760 757 -3 Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nommu: fix cases where we mangle argv[0][0]Denys Vlasenko2011-11-221-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* wget: URL-decode user:password before base64-encoding it into auth hdr. ↵Denys Vlasenko2011-09-111-74/+2
| | | | | | | | | | | | | | | Closes 3625. function old new delta percent_decode_in_place - 152 +152 parse_url 304 317 +13 handle_incoming_and_exit 2795 2798 +3 httpd_main 763 760 -3 decodeString 152 - -152 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 2/1 up/down: 168/-155) Total: 13 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* adduser: safe username passing to passwd/addgroupDenys Vlasenko2011-05-131-1/+1
| | | | | | | | | | | | | | | | | | | passwd: support creating SHA passwords random code shrink function old new delta crypt_make_pw_salt - 87 +87 adduser_main 883 904 +21 ... crypt_make_salt 99 89 -10 chpasswd_main 329 312 -17 packed_usage 28731 28691 -40 passwd_main 1070 1000 -70 cryptpw_main 310 224 -86 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/12 up/down: 154/-288) Total: -134 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move remaining help text from include/usage.src.hPere Orga2011-04-111-0/+26
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* http: document index.cgi usage. no code changesDenys Vlasenko2011-04-101-1/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: don't send error messages with gzip encodingPeter Korsgaard2011-03-271-0/+1
| | | | | | | | | | | If CONFIG_FEATURE_HTTPD_GZIP is enabled and request contained 'Accept-Encoding: gzip', then errors were sent with 'Content-Encoding: gzip' even though they aren't. Fix it by clearing content_gzip before sending the headers. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: send correct mtime for .gz filesDenys Vlasenko2011-01-111-0/+1
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* whitespace cleanupDenys Vlasenko2010-10-291-2/+2
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: simplified "gzip" testPeter Korsgaard2010-07-261-11/+11
| | | | | | | | function old new delta handle_incoming_and_exit 2830 2807 -23 Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: optional support for gzip-compressed pagesPeter Korsgaard2010-07-251-4/+52
| | | | | | | | | | | | function old new delta send_file_and_exit 662 761 +99 handle_incoming_and_exit 2756 2830 +74 send_headers 603 654 +51 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 224/0) Total: 224 bytes Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: cosmetic fixes, no code changesDenys Vlasenko2010-07-251-30/+23
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* remove recently added erroneous _and_die()Denys Vlasenko2010-06-271-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make exec failure message more consistentDenys Vlasenko2010-06-251-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: fix proxy mode bug (annoying but harmless), better help textDenys Vlasenko2010-04-021-4/+4
| | | | | | | | | function old new delta cgi_io_loop_and_exit 594 635 +41 packed_usage 26815 26841 +26 handle_incoming_and_exit 2745 2739 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: do not check for POLLIN/POLLOUT only, just in case it's POLHUP/POLERRDenys Vlasenko2010-03-021-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* reuse a few stringsBernhard Reutner-Fischer2010-02-261-1/+1
| | | | | | | | | text data bss dec hex filename 839040 453 6828 846321 ce9f1 busybox_old 839019 453 6828 846300 ce9dc busybox_unstripped Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: add/remove safe_, it seems we had a few incorrect usesDenys Vlasenko2010-01-121-3/+3
| | | | | | | | | | | | | | | | function old new delta chat_main 1359 1361 +2 microcom_main 712 713 +1 ifplugd_main 1109 1110 +1 arpping 465 466 +1 acpid_main 440 441 +1 script_main 1069 1067 -2 cgi_io_loop_and_exit 594 591 -3 telnet_main 1475 1469 -6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/3 up/down: 6/-11) Total: -5 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd -m: output salted MD5 hash. By (forrest AT hifulltech.com)Denys Vlasenko2009-12-161-1/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* wget: check for close success; fix chunked; do not bother to send QUIT to ftpDenys Vlasenko2009-12-111-2/+2
| | | | | | Also, random fixes to use %u for unsigned quantities. -14 bytes in wget. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: shrink mime type matching code (suggested by Bernhard)Denys Vlasenko2009-09-101-42/+55
| | | | | | | | | | | | | | | function old new delta static.suffixTable 100 231 +131 send_file_and_exit 625 658 +33 handle_incoming_and_exit 2749 2745 -4 send_cgi_and_exit 936 901 -35 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 164/-39) Total: 125 bytes text data bss dec hex filename 824631 458 6956 832045 cb22d busybox_old 824550 458 6956 831964 cb1dc busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: fix bug 601 "I:index.php does not run interpreter on DIR/ url"Denys Vlasenko2009-09-081-19/+17
| | | | | | | | | | | function old new delta parse_conf 1462 1485 +23 index_html - 11 +11 handle_incoming_and_exit 2762 2749 -13 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 34/-13) Total: 21 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* telnetd: properly close fds in childDenys Vlasenko2009-06-091-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix debug messageBernhard Reutner-Fischer2009-05-041-7/+8
| | | | | Print the mime-type only after it has been set. Add possible TODOs: use TCP_CORK, parse_config()
* httpd: speed up httpd.conf at the cost of 49 bytes of codeDenys Vlasenko2009-05-021-8/+20
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: fix small bug in parser. it crept in during cleanupDenis Vlasenko2009-04-221-4/+3
|
* httpd: allow empty lines in conf fileDenis Vlasenko2009-04-221-1/+3
|
* httpd: simplify insane conf file parserDenis Vlasenko2009-04-221-175/+173
| | | | | | | | | | | | | | function old new delta bb_simplify_abs_path_inplace - 98 +98 parse_expr 824 832 +8 passwd_main 1025 1027 +2 evalvar 1374 1376 +2 parse_command 1463 1460 -3 bb_simplify_path 137 55 -82 parse_conf 1572 1422 -150 ------------------------------------------------------------------------------ (add/remove: 3/2 grow/shrink: 3/3 up/down: 126/-251) Total: -125 bytes
* *: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko2009-04-211-35/+35
| | | | | | and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
* httpd: add comment explaining why SERVER_NAME etc is not set.Denis Vlasenko2009-03-181-0/+2
|
* httpd: tiny optimizationDenis Vlasenko2009-02-051-7/+6
|
* httpd:Denis Vlasenko2009-02-041-101/+56
| | | | | | | | | | | | | | | | | | | | | Kill config options by making them always on: FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES This makes httpd.c remotely readable - it had ~125 #ifdefs, now it has ~100. The growth on a .config with all FEATURE_HTTPDs off is: function old new delta send_file_and_exit - 269 +269 parse_conf 683 763 +80 free_llist - 32 +32 httpd_main 427 454 +27 sighup_handler - 15 +15 handle_incoming_and_exit 1110 905 -205 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 2/1 up/down: 423/-205) Total: 218 bytes
* udhcpd: add code which rejects lease files with suspicious or old timestamp.Denis Vlasenko2009-02-021-1/+1
| | | | | *: s/time(0)/time(NULL)/g
* httpd: set $HOST to Host: header value. +83 bytes.Denis Vlasenko2008-11-221-0/+5
| | | | | by Tobias Poschwatta (tp AT fonz.de)
* - pass "Accept:" and "Accept-Language:" header to CGI scripts (Alina ↵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.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)Bernhard Reutner-Fischer2008-07-211-3/+1
| | | | This needs further love, alot of love.. Tito?
* - fix spellingBernhard Reutner-Fischer2008-07-211-1/+1
|