diff --git a/src/core/probe.c b/src/core/probe.c index dfed19e..b27d86a 100644 --- a/src/core/probe.c +++ b/src/core/probe.c @@ -71,6 +71,15 @@ static void probe_net_event(struct net_connection* con, int events, void *arg) probe_destroy(probe); return; } + else if ((memcmp(probe_recvbuf, "GET ", 4) == 0) || + (memcmp(probe_recvbuf, "POST", 4) == 0) || + (memcmp(probe_recvbuf, "HEAD", 4) == 0)) + { + /* Looks like HTTP - Not supported, but we log it. */ + LOG_TRACE("Probed HTTP connection. Not supported closing connection (%s)", ip_convert_to_string(&probe->addr)); + const char* buf = "501 Not implemented\r\n\r\n"; + net_con_send(con, buf, strlen(buf)); + } #ifdef SSL_SUPPORT else if (bytes >= 11 && probe_recvbuf[0] == 22 &&