diff options
author | Kamil Dudka <kdudka@redhat.com> | 2010-08-12 21:45:31 +0200 |
---|---|---|
committer | Kamil Dudka <kdudka@redhat.com> | 2010-08-15 11:26:13 +0200 |
commit | 5907777153932e27805b192443dfe2845327a8c4 (patch) | |
tree | 5c941c9d56f92f561eb2bc379b6faedb300ca6de | |
parent | 72da720b4a647494ae21700dba4fdb94936827e9 (diff) |
curl -T: ignore file size of special files
original bug report at https://bugzilla.redhat.com/622520
-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)) { |