Commit a4f33f37 authored by PhiBo's avatar PhiBo 🚀

Connection close header is already send by send()

parent 255ce91c
......@@ -27,8 +27,6 @@ void handleAPIPort()
{
uint16_t port;
server->sendHeader("Connection", "close");
if (server->method() == HTTP_GET) {
port = getAPIPort();
server->send(200, "text/plain", String(port));
......@@ -45,8 +43,6 @@ void handleAPIPort()
void handleNotFound(){
server->sendHeader("Connection", "close");
String message = "File Not Found\n\n";
message += "URI: ";
message += server->uri();
......@@ -67,8 +63,6 @@ void handlePassword()
char password[65];
String password_s;
server->sendHeader("Connection", "close");
if (server->method() == HTTP_GET) {
len = getWiFiPassword(&password[0], 64);
if(len > 0) {
......@@ -99,8 +93,6 @@ void handleRegister()
char buffer[201];
uint8_t i;
server->sendHeader("Connection", "close");
String email = server->arg("email");
String name = server->arg("name");
......@@ -179,8 +171,6 @@ void handleRestart()
void handleRoot()
{
server->sendHeader("Connection", "close");
String message = "SensorNode\n\n";
message += "SSID(AP): SensorNode\n";
message += "IP(AP): ";
......@@ -198,8 +188,6 @@ void handleSave()
{
EEPROM.commit();
server->sendHeader("Connection", "close");
server->send(200, "text/plain", "Config saved to eeprom");
}
......@@ -210,8 +198,6 @@ void handleScanSSID()
String ssid;
uint8_t first = 1;
server->sendHeader("Connection", "close");
if (server->method() == HTTP_GET) {
query = server->arg("q");
int n = WiFi.scanNetworks();
......@@ -260,8 +246,6 @@ void handleSSID()
char ssid[65];
String ssid_s;
server->sendHeader("Connection", "close");
if (server->method() == HTTP_GET) {
len = getWiFiSSID(&ssid[0], 64);
if(len > 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment