summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwgetpaste6
1 files changed, 3 insertions, 3 deletions
diff --git a/wgetpaste b/wgetpaste
index c0a2690..cd6c098 100755
--- a/wgetpaste
+++ b/wgetpaste
@@ -728,6 +728,9 @@ SIZE=$(wc -c <<< "$INPUT")
LINES=$(wc -l <<< "$INPUT")
warnings >&2
+# set recipient
+RECIPIENT=$(getrecipient RAW)
+
# create temp file (wget is much more reliable reading large input via --post-file rather than --post-data)
[[ -f $TMPF ]] || TMPF=$(mktemp /tmp/wgetpaste.XXXXXX)
if [[ -f $TMPF ]]; then
@@ -739,9 +742,6 @@ else
WGETARGS="--post-data=$(postdata | sed -e 's|$|%0a|g' -e 's|\t|%09|g' | tr -d '\n')"
fi
-# set recipient
-RECIPIENT=$(getrecipient RAW)
-
# paste it
WGETARGS="--tries=5 --timeout=60 $WGETARGS"
if geturl needstdout || [[ $DEBUG || ! -w /dev/null ]]; then