Compare commits
	
		
			4 Commits
		
	
	
		
			feature/vo
			...
			feature/es
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| b25b62ceb9 | |||
| 35eafc624a | |||
| f05e235243 | |||
| fd04d2ff66 | 
							
								
								
									
										24
									
								
								library.json
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								library.json
									
									
									
									
									
								
							@@ -12,28 +12,8 @@
 | 
			
		||||
    "type": "git",
 | 
			
		||||
    "url": "https://github.com/esphome/ESPAsyncWebServer.git"
 | 
			
		||||
  },
 | 
			
		||||
  "version": "3.0.0",
 | 
			
		||||
  "version": "3.1.0",
 | 
			
		||||
  "license": "LGPL-3.0",
 | 
			
		||||
  "frameworks": "arduino",
 | 
			
		||||
  "platforms": ["espressif8266", "espressif32", "libretuya"],
 | 
			
		||||
  "dependencies": [
 | 
			
		||||
    {
 | 
			
		||||
      "owner": "ottowinter",
 | 
			
		||||
      "name": "ESPAsyncTCP-esphome",
 | 
			
		||||
      "platforms": "espressif8266"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "owner": "esphome",
 | 
			
		||||
      "name": "AsyncTCP-esphome",
 | 
			
		||||
      "platforms": ["espressif32", "libretuya"]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "Hash",
 | 
			
		||||
      "platforms": "espressif8266"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "ESP8266WiFi",
 | 
			
		||||
      "platforms": "espressif8266"
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
  "platforms": ["espressif8266", "espressif32", "libretiny"]
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,7 @@
 | 
			
		||||
 | 
			
		||||
#include <Arduino.h>
 | 
			
		||||
#include <Arduino.h>
 | 
			
		||||
#if defined(ESP32) || defined(LIBRETUYA)
 | 
			
		||||
#if defined(ESP32) || defined(LIBRETINY)
 | 
			
		||||
#include <AsyncTCP.h>
 | 
			
		||||
#else
 | 
			
		||||
#include <ESPAsyncTCP.h>
 | 
			
		||||
@@ -43,7 +43,7 @@
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(ESP32) || defined(LIBRETUYA)
 | 
			
		||||
#if defined(ESP32) || defined(LIBRETINY)
 | 
			
		||||
#define DEFAULT_MAX_SSE_CLIENTS 8
 | 
			
		||||
#else
 | 
			
		||||
#define DEFAULT_MAX_SSE_CLIENTS 4
 | 
			
		||||
 
 | 
			
		||||
@@ -102,7 +102,7 @@ size_t webSocketSendFrame(AsyncClient *client, bool final, uint8_t opcode, bool
 | 
			
		||||
      return 0;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  client->send();
 | 
			
		||||
  if (!client->send()) return 0;
 | 
			
		||||
  return len;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -22,13 +22,17 @@
 | 
			
		||||
#define ASYNCWEBSOCKET_H_
 | 
			
		||||
 | 
			
		||||
#include <Arduino.h>
 | 
			
		||||
#if defined(ESP32) || defined(LIBRETUYA)
 | 
			
		||||
#if defined(ESP32) || defined(LIBRETINY)
 | 
			
		||||
#include <AsyncTCP.h>
 | 
			
		||||
#ifndef WS_MAX_QUEUED_MESSAGES
 | 
			
		||||
#define WS_MAX_QUEUED_MESSAGES 32
 | 
			
		||||
#endif
 | 
			
		||||
#else
 | 
			
		||||
#include <ESPAsyncTCP.h>
 | 
			
		||||
#ifndef WS_MAX_QUEUED_MESSAGES
 | 
			
		||||
#define WS_MAX_QUEUED_MESSAGES 8
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
#include <ESPAsyncWebServer.h>
 | 
			
		||||
 | 
			
		||||
#include "AsyncWebSynchronization.h"
 | 
			
		||||
@@ -40,7 +44,7 @@
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(ESP32) || defined(LIBRETUYA)
 | 
			
		||||
#if defined(ESP32) || defined(LIBRETINY)
 | 
			
		||||
#define DEFAULT_MAX_WS_CLIENTS 8
 | 
			
		||||
#else
 | 
			
		||||
#define DEFAULT_MAX_WS_CLIENTS 4
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@
 | 
			
		||||
 | 
			
		||||
#include <ESPAsyncWebServer.h>
 | 
			
		||||
 | 
			
		||||
#if defined(ESP32) || (defined(LIBRETUYA) && LT_HAS_FREERTOS)
 | 
			
		||||
#if defined(ESP32) || (defined(LIBRETINY) && LT_HAS_FREERTOS)
 | 
			
		||||
 | 
			
		||||
// This is the ESP32 version of the Sync Lock, using the FreeRTOS Semaphore
 | 
			
		||||
class AsyncWebLock
 | 
			
		||||
@@ -84,4 +84,4 @@ public:
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // ASYNCWEBSYNCHRONIZATION_H_
 | 
			
		||||
#endif // ASYNCWEBSYNCHRONIZATION_H_
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@
 | 
			
		||||
 | 
			
		||||
#include "StringArray.h"
 | 
			
		||||
 | 
			
		||||
#if defined(ESP32) || defined(LIBRETUYA)
 | 
			
		||||
#if defined(ESP32) || defined(LIBRETINY)
 | 
			
		||||
#include <WiFi.h>
 | 
			
		||||
#include <AsyncTCP.h>
 | 
			
		||||
#elif defined(ESP8266)
 | 
			
		||||
 
 | 
			
		||||
@@ -180,10 +180,15 @@ void AsyncWebServerRequest::_onData(void *buf, size_t len){
 | 
			
		||||
 | 
			
		||||
void AsyncWebServerRequest::_removeNotInterestingHeaders(){
 | 
			
		||||
  if (_interestingHeaders.containsIgnoreCase("ANY")) return; // nothing to do
 | 
			
		||||
  for(const auto& header: _headers){
 | 
			
		||||
      if(!_interestingHeaders.containsIgnoreCase(header->name().c_str())){
 | 
			
		||||
 | 
			
		||||
  auto itr = _headers.begin();
 | 
			
		||||
  while (itr != _headers.end())
 | 
			
		||||
  {
 | 
			
		||||
      const auto header = *itr;
 | 
			
		||||
      ++itr; // ++operator before remove(), otherwise itr becomes invalid
 | 
			
		||||
 | 
			
		||||
      if (!_interestingHeaders.containsIgnoreCase(header->name().c_str()))
 | 
			
		||||
        _headers.remove(header);
 | 
			
		||||
      }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user