@@ -1238,11 +1238,9 @@ handle_request(void)
1238
1238
nvram_set_int ("httpd_handle_request_fromapp" , fromapp );
1239
1239
if (login_state == 3 && !fromapp ) { // few pages can be shown even someone else login
1240
1240
if (!(mime_exception & MIME_EXCEPTION_MAINPAGE || (strncmp (file , "Main_Login.asp" , 14 )== 0 && login_error_status == 9 ) || ((!handler -> auth ) && strncmp (file , "Main_Login.asp" , 14 ) != 0 ))) {
1241
- if (strcasecmp (method , "post" ) == 0 ){
1242
- if (handler -> input ) {
1243
- handler -> input (file , conn_fp , cl , boundary );
1244
- }
1245
- }
1241
+ if (strcasecmp (method , "post" ) == 0 && handler -> input ) //response post request
1242
+ while (cl -- ) (void )fgetc (conn_fp );
1243
+
1246
1244
send_login_page (fromapp , NOLOGIN , NULL , NULL , 0 );
1247
1245
return ;
1248
1246
}
@@ -1257,11 +1255,9 @@ handle_request(void)
1257
1255
if (do_referer & CHECK_REFERER ){
1258
1256
referer_result = referer_check (referer , fromapp );
1259
1257
if (referer_result != 0 ){
1260
- if (strcasecmp (method , "post" ) == 0 ){
1261
- if (handler -> input ) {
1262
- handler -> input (file , conn_fp , cl , boundary );
1263
- }
1264
- }
1258
+ if (strcasecmp (method , "post" ) == 0 && handler -> input ) //response post request
1259
+ while (cl -- ) (void )fgetc (conn_fp );
1260
+
1265
1261
send_login_page (fromapp , referer_result , NULL , NULL , 0 );
1266
1262
//if(!fromapp) http_logout(login_ip_tmp, cookies);
1267
1263
return ;
@@ -1271,13 +1267,10 @@ handle_request(void)
1271
1267
auth_result = auth_check (auth_realm , authorization , url , file , cookies , fromapp );
1272
1268
if (auth_result != 0 )
1273
1269
{
1274
- if (strcasecmp (method , "post" ) == 0 ){
1275
- if (handler -> input ) {
1276
- handler -> input (file , conn_fp , cl , boundary );
1277
- }
1278
- send_login_page (fromapp , auth_result , NULL , NULL , 0 );
1279
- }
1280
- //if(!fromapp) http_logout(login_ip_tmp, cookies);
1270
+ if (strcasecmp (method , "post" ) == 0 && handler -> input ) //response post request
1271
+ while (cl -- ) (void )fgetc (conn_fp );
1272
+
1273
+ send_login_page (fromapp , auth_result , NULL , NULL , 0 );
1281
1274
return ;
1282
1275
}
1283
1276
}
0 commit comments