diff options
-rw-r--r-- | RELEASE-NOTES | 2 | ||||
-rw-r--r-- | src/main.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d33314b00..080e572e9 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 5585c1755..3b78d602f 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)) { |