forked from me-no-dev/ESPAsyncWebServer
fix return in skip
make setLength void make destructor virtual
This commit is contained in:
@@ -38,7 +38,7 @@ class ChunkPrint : public Print{
|
|||||||
size_t write(uint8_t c){
|
size_t write(uint8_t c){
|
||||||
if (_to_skip > 0) {
|
if (_to_skip > 0) {
|
||||||
_to_skip--;
|
_to_skip--;
|
||||||
return 0;
|
return 1;
|
||||||
} else if (_to_write > 0) {
|
} else if (_to_write > 0) {
|
||||||
_to_write--;
|
_to_write--;
|
||||||
_destination[_pos++] = c;
|
_destination[_pos++] = c;
|
||||||
@@ -59,10 +59,10 @@ class AsyncJsonResponse: public AsyncAbstractResponse {
|
|||||||
_contentType = "text/json";
|
_contentType = "text/json";
|
||||||
_root = _jsonBuffer.createObject();
|
_root = _jsonBuffer.createObject();
|
||||||
}
|
}
|
||||||
~AsyncJsonResponse() {}
|
virtual ~AsyncJsonResponse() {}
|
||||||
JsonVariant & getRoot() { return _root; }
|
JsonVariant & getRoot() { return _root; }
|
||||||
bool _sourceValid() { return _isValid; }
|
bool _sourceValid() { return _isValid; }
|
||||||
bool setLength() {
|
void setLength() {
|
||||||
|
|
||||||
_contentLength = _root.measureLength();
|
_contentLength = _root.measureLength();
|
||||||
if (_contentLength) { _isValid = true; }
|
if (_contentLength) { _isValid = true; }
|
||||||
|
Reference in New Issue
Block a user