@@ -24,7 +24,7 @@ using namespace asyncsrv;
2424
2525// Tests:
2626//
27- // Upload a file with PUT
27+ // Upload a file with PUT
2828// curl -T myfile.txt http://192.168.4.1/
2929//
3030// Upload a file with PUT using chunked encoding
@@ -78,7 +78,7 @@ void handleRequest(AsyncWebServerRequest *request) {
7878 state->outFile .close ();
7979 request->send (201 ); // Created
8080 }
81- // Finally, releast the resources used by state
81+ // Finally, release the resources used by state
8282 delete state;
8383 request->_tempObject = nullptr ;
8484 return ;
@@ -105,7 +105,7 @@ void handleRequest(AsyncWebServerRequest *request) {
105105 request->send (403 );
106106}
107107
108- void handleBody (AsyncWebServerRequest *request, unsigned char *data, size_t len, size_t index, size_t total) {
108+ void handleBody (AsyncWebServerRequest *request, uint8_t *data, size_t len, size_t index, size_t total) {
109109 if (request->method () == HTTP_PUT ) {
110110 auto state = static_cast <RequestState *>(request->_tempObject );
111111 if (index == 0 ) {
@@ -125,7 +125,7 @@ void handleBody(AsyncWebServerRequest *request, unsigned char *data, size_t len,
125125#endif
126126 avail -= 4096 ; // Reserve a block for overhead
127127 if (total > avail) {
128- Serial.printf (" PUT %d bytes will not fit in available space (%d ).\n " , total, avail);
128+ Serial.printf (" PUT %u bytes will not fit in available space (%u ).\n " , total, avail);
129129 request->send (507 , " text/plain" , " Too large for available storage\r\n " );
130130 return ;
131131 }
0 commit comments