termux-packages/packages/busybox/0010-networking-httpd-default-port.patch
Leonid Pliushch ac5daf7925 busybox: update patches
Reorganize patches & do following changes:

 * Enable use of sethostname(2) in utility `hostname`.
 * Enable setting time in utility `date` - busybox already provide own
   implementation of stime(2).

- both features require root.
2019-11-12 02:51:21 +02:00

40 lines
1.5 KiB
Diff

diff -uNr busybox-1.31.1/networking/httpd.c busybox-1.31.1.mod/networking/httpd.c
--- busybox-1.31.1/networking/httpd.c 2019-11-11 21:31:58.406733857 +0200
+++ busybox-1.31.1.mod/networking/httpd.c 2019-11-11 22:29:16.534250966 +0200
@@ -232,7 +232,7 @@
//usage: "\n -i Inetd mode"
//usage: "\n -f Don't daemonize"
//usage: "\n -v[v] Verbose"
-//usage: "\n -p [IP:]PORT Bind to IP:PORT (default *:80)"
+//usage: "\n -p [IP:]PORT Bind to IP:PORT (default *:8080)"
//usage: IF_FEATURE_HTTPD_SETUID(
//usage: "\n -u USER[:GRP] Set uid/gid after binding to port")
//usage: IF_FEATURE_HTTPD_BASIC_AUTH(
@@ -488,7 +488,7 @@
asm volatile("":::"memory"); \
IF_FEATURE_HTTPD_BASIC_AUTH(g_realm = "Web Server Authentication";) \
IF_FEATURE_HTTPD_RANGES(range_start = -1;) \
- bind_addr_or_port = "80"; \
+ bind_addr_or_port = "8080"; \
index_page = index_html; \
file_size = -1; \
} while (0)
@@ -1004,7 +1004,7 @@
if (!errno && n && n <= 0xffff)
n = create_and_bind_stream_or_die(NULL, n);
else
- n = create_and_bind_stream_or_die(bind_addr_or_port, 80);
+ n = create_and_bind_stream_or_die(bind_addr_or_port, 8080);
xlisten(n, 9);
return n;
}
@@ -2209,7 +2209,7 @@
if (proxy_entry) {
if (verbose > 1)
bb_error_msg("proxy:%s", urlcopy);
- lsa = host2sockaddr(proxy_entry->host_port, 80);
+ lsa = host2sockaddr(proxy_entry->host_port, 8080);
if (!lsa)
send_headers_and_exit(HTTP_INTERNAL_SERVER_ERROR);
proxy_fd = socket(lsa->u.sa.sa_family, SOCK_STREAM, 0);