From 2e459558f54f3f228398738e31834cd45fabf834 Mon Sep 17 00:00:00 2001 From: "psyc://loupsycedyglgamf.onion/~lynX" Date: Fri, 11 May 2018 17:08:52 +0200 Subject: [PATCH] _flag_disable_network_circuit_connect, _flag_disable_idna_stringprep, no PERSISTENT_MASTERS --- world/net/circuit.c | 10 ++++++---- world/net/http/server.c | 1 + world/net/include/net.h | 8 ++++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/world/net/circuit.c b/world/net/circuit.c index d2a7807..cbb1664 100644 --- a/world/net/circuit.c +++ b/world/net/circuit.c @@ -261,29 +261,31 @@ runQ() { } connect(ho, po, transport, srv, extra) { +#ifndef _flag_disable_network_circuit_connect if (interactive()) return -8; P3(("connect: %O, %O, %O, %O for %O\n", ho, po, transport, srv, ME)) if (time() < time_of_connect_attempt + waitforme) return -2; if (ho) { // paranoid: stringp(ho) && strlen(ho)) { if (po) port = po; -#ifndef ERQ_WITHOUT_SRV +# ifndef ERQ_WITHOUT_SRV if (srv) { hostname = lower_case(ho); host = 0; } else -#endif +# endif host = lower_case(ho); P2(("connect.%s:\t%O, %O, %O\t%O\n", srv || "to", ho, po, transport, ME)) } -#ifndef ERQ_WITHOUT_SRV +# ifndef ERQ_WITHOUT_SRV P4(("connect->srv_choose? depends on srv %O\n", srv)) if (srv) return dns_srv_resolve(hostname, srv, // _psyc._tls.domain transport == "s" ? "tls" : "tcp", #'srv_choose, transport); -#endif +# endif if (::connect(host, port, transport, extra) >= 0) time_of_connect_attempt = time(); +#endif } disconnected(remaining) { diff --git a/world/net/http/server.c b/world/net/http/server.c index ab206a2..fcfb5cb 100644 --- a/world/net/http/server.c +++ b/world/net/http/server.c @@ -114,6 +114,7 @@ process_header() { parse_request(input) { P0(("=== HTTP got: %O from %O\n", input, query_ip_name(ME))) + if (input == "HEAD / HTTP/1.1") return 1; if (!input || input=="") { // should return error? diff --git a/world/net/include/net.h b/world/net/include/net.h index a9162cd..b93a37a 100644 --- a/world/net/include/net.h +++ b/world/net/include/net.h @@ -53,7 +53,8 @@ # define DEFAULT_CONTENT_TYPE "text/html; charset=" SYSTEM_CHARSET #endif -#if __EFUN_DEFINED__(idna_stringprep) && defined(DRIVER_PATH) +// 2018-05 tmp disabled stringprep: +#if __EFUN_DEFINED__(idna_stringprep) && defined(DRIVER_PATH) && !defined(_flag_disable_idna_stringprep) // stringprep needs utf8 arguments // this results in lots of conversions some of which look like // system->utf­>system->utf. luckily UTF8 is our system charset. @@ -221,7 +222,10 @@ # define WANT_S2S_TLS # define WANT_S2S_SASL # define ENTER_MEMBERS -# define PERSISTENT_MASTERS +// disabled 2018-05 due to stringprep messing up the _routes +// data structures *and* plenty of karteileichen which means +// that clean-up of _routes is not working!! +//# define PERSISTENT_MASTERS # define NEW_RENDER # define MUCSUC //# define XMPP_BIDI