@@ -286,7 +286,7 @@ if ($pid) {
286
286
file_put_contents (__DIR__ .'/ ' .$ m [1 ], $ data , FILE_APPEND );
287
287
fputs ($ s , "226 Closing data Connection. \r\n" );
288
288
fclose ($ fs );
289
- }
289
+ }
290
290
291
291
}elseif (preg_match ("~^CWD ([A-Za-z./]+) \r\n$~ " , $ buf , $ m )) {
292
292
change_dir ($ m [1 ]);
@@ -395,17 +395,17 @@ if ($pid) {
395
395
$ transfer_type = $ ascii ? 'ASCII ' : 'BINARY ' ;
396
396
fputs ($ fs , "Bar \r\n" );
397
397
fputs ($ s , "226 Closing data Connection. \r\n" );
398
- break ;
399
- case "fget_large " :
398
+ break ;
399
+ case "fget_large " :
400
400
fputs ($ s , "150 File status okay; about to open data connection. \r\n" );
401
- $ transfer_type = $ ascii ? 'ASCII ' : 'BINARY ' ;
402
- if ($ GLOBALS ['rest_pos ' ] == '5368709119 ' ) {
403
- fputs ($ fs , "X " );
404
- } else {
405
- fputs ($ fs , "Y " );
406
- }
401
+ $ transfer_type = $ ascii ? 'ASCII ' : 'BINARY ' ;
402
+ if ($ GLOBALS ['rest_pos ' ] == '5368709119 ' ) {
403
+ fputs ($ fs , "X " );
404
+ } else {
405
+ fputs ($ fs , "Y " );
406
+ }
407
407
fputs ($ s , "226 Closing data Connection. \r\n" );
408
- break ;
408
+ break ;
409
409
case "mediumfile " :
410
410
fputs ($ s , "150 File status okay; about to open data connection. \r\n" );
411
411
for ($ i = 0 ; $ i < 150 ; $ i ++){
@@ -471,11 +471,11 @@ if ($pid) {
471
471
}elseif (preg_match ('/^LIST no_exists\// ' , $ buf , $ matches )) {
472
472
fputs ($ s , "425 Error establishing connection \r\n" );
473
473
474
- }elseif (preg_match ('/^REST (\d+)/ ' , $ buf , $ matches )) {
474
+ }elseif (preg_match ('/^REST (\d+)/ ' , $ buf , $ matches )) {
475
475
$ GLOBALS ['rest_pos ' ] = $ matches [1 ];
476
476
fputs ($ s , "350 OK \r\n" );
477
- }elseif (preg_match ('/^SIZE largefile/ ' , $ buf )) {
478
- fputs ($ s , "213 5368709120 \r\n" );
477
+ }elseif (preg_match ('/^SIZE largefile/ ' , $ buf )) {
478
+ fputs ($ s , "213 5368709120 \r\n" );
479
479
}elseif (preg_match ('/^RNFR existing_file/ ' , $ buf , $ matches )) {
480
480
fputs ($ s , "350 File or directory exists, ready for destination name \r\n" );
481
481
}elseif (preg_match ('/^RNFR nonexisting_file/ ' , $ buf , $ matches )) {
@@ -524,7 +524,7 @@ if ($pid) {
524
524
525
525
fputs ($ s , "226 Closing data Connection. \r\n" );
526
526
fclose ($ fs );
527
- }else {
527
+ }else {
528
528
fputs ($ s , "500 Syntax error, command unrecognized. \r\n" );
529
529
dump_and_exit ($ buf );
530
530
}
0 commit comments