@@ -610,7 +610,7 @@ void SPIFFSFileupload()
610
610
if (auth_level == LEVEL_GUEST) {
611
611
web_interface->_upload_status =UPLOAD_STATUS_FAILED;
612
612
ESPCOM::println (F (" Upload rejected" ), PRINTER_PIPE);
613
- pushError (ESP_ERROR_AUTHENTICATION, " Upload rejected" );
613
+ pushError (ESP_ERROR_AUTHENTICATION, " Upload rejected" , 401 );
614
614
} else {
615
615
// get current file ID
616
616
HTTPUpload& upload = (web_interface->web_server ).upload ();
@@ -724,7 +724,7 @@ void WebUpdateUpload()
724
724
web_interface->_upload_status =UPLOAD_STATUS_FAILED;
725
725
ESPCOM::println (F (" Update failed" ), PRINTER_PIPE);
726
726
LOG (" Web Update failed\r\n " );
727
- pushError (ESP_ERROR_AUTHENTICATION, " Upload rejected" );
727
+ pushError (ESP_ERROR_AUTHENTICATION, " Upload rejected" , 401 );
728
728
} else {
729
729
// get current file ID
730
730
HTTPUpload& upload = (web_interface->web_server ).upload ();
@@ -1232,7 +1232,7 @@ void handle_serial_SDFileList()
1232
1232
}
1233
1233
1234
1234
#define NB_RETRY 5
1235
- #define MAX_RESEND_BUFFER 128
1235
+ #define MAX_RESEND_BUFFER 228
1236
1236
#define SERIAL_CHECK_TIMEOUT 2000
1237
1237
// SD file upload by serial
1238
1238
void SDFile_serial_upload ()
@@ -1246,7 +1246,7 @@ void SDFile_serial_upload()
1246
1246
if (web_interface->is_authenticated () == LEVEL_GUEST) {
1247
1247
web_interface->_upload_status =UPLOAD_STATUS_FAILED;
1248
1248
ESPCOM::println (F (" SD upload rejected" ), PRINTER_PIPE);
1249
- pushError (ESP_ERROR_AUTHENTICATION, " Upload rejected" );
1249
+ pushError (ESP_ERROR_AUTHENTICATION, " Upload rejected" , 401 );
1250
1250
LOG (" SD upload rejected\r\n " );
1251
1251
} else {
1252
1252
// retrieve current file id
@@ -1337,7 +1337,7 @@ void SDFile_serial_upload()
1337
1337
// if comment line then reset
1338
1338
is_comment = false ;
1339
1339
// does line fit the buffer ?
1340
- if (current_line.length () < 126 ) {
1340
+ if (current_line.length () < MAX_RESEND_BUFFER ) {
1341
1341
// do we have something in buffer ?
1342
1342
if (current_line.length () > 0 ) {
1343
1343
lineNb++;
@@ -1361,7 +1361,7 @@ void SDFile_serial_upload()
1361
1361
pushError (ESP_ERROR_BUFFER_OVERFLOW, " Error buffer overflow" );
1362
1362
}
1363
1363
} else if (!is_comment) {
1364
- if (current_line.length () < 126 ) {
1364
+ if (current_line.length () < MAX_RESEND_BUFFER ) {
1365
1365
current_line += char (upload.buf [pos]); // copy current char to buffer to send/resend
1366
1366
} else {
1367
1367
LOG (" Error over buffer\n " )
0 commit comments