curl -T: ignore file size of special files

original bug report at https://bugzilla.redhat.com/622520
This commit is contained in:
Kamil Dudka 2010-08-12 21:45:31 +02:00
parent 72da720b4a
commit 5907777153
2 changed files with 5 additions and 2 deletions

View File

@ -9,7 +9,7 @@ Curl and libcurl 7.21.2
This release includes the following changes:
o
o curl -T: ignore file size of special files
This release includes the following bugfixes:

View File

@ -4925,7 +4925,10 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
goto quit_urls;
}
infdopen=TRUE;
uploadfilesize=fileinfo.st_size;
/* we ignore file size for char/block devices, sockets, etc. */
if(S_IFREG == (fileinfo.st_mode & S_IFMT))
uploadfilesize=fileinfo.st_size;
}
else if(uploadfile && stdin_upload(uploadfile)) {