diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d33314b00d188ee3f1143a1fb7ea60787df0a8c9..080e572e9473e2a7d2470c8fe628ecaaf4be0e00 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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: diff --git a/src/main.c b/src/main.c index 5585c1755bf8b44c51b32975df11f456000b258a..3b78d602f6d4c9c245b2aea2864a53c0da6caad2 100644 --- a/src/main.c +++ b/src/main.c @@ -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)) {