mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2026-02-03 14:13:26 +00:00
.bashrc transfer command code fails on HTTPS servers #136
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yelodevopsi on GitHub.
The bug lies somewhere in the generated transfer() alias code under
# Add this to .bashrc or .zshrc or its equivalentI've tested some examples, but I'm not that fluent in shell-script so I'll just post the results of the test. Maybe someone can pinpoint where this is going wrong:
The alias generated is this:
I've re-added and tested the code multiple time and refreshed with
source ~/.bashrcPS: I've replaced my real domain with
my.domain.comand IP's with123.123.123.123belowNow - It works using these commands however:
transfer hello.txtFor some wierd reason it always works with .txt files?curl --progress-bar --upload-file compressed.zip https://my.domain.com/compressed.zipcurl --progress-bar --upload-file dave.jpg https://my.domain.com/dave.jpg=>https://my.domain.com/wekBPA/dave.jpgFails with almost anything except
hello.txtor pure text-files:transfer compressed.ziptransfer dave.jpgThey give the errors in client and server respectively:
client:
docker-server:
The server-docker code:
From the error-msg I assumed it had something to do with my
--basedir /param, but--basedir /tmp/gives the same error. Beside the equivalent curl-commands above should also fail right?The client I'm testing from has this curl version:
And server:
Ubuntu 18.04.5 LTS@paolafrancesca commented on GitHub:
you can change the command to
tee /dev/nullis required to show the progress bar and print the output in seamless wayif you renounce the progress bar you can do without tee
you can also check
man teeon the system where the command is failing, to see if it has different params and how to fix@yelodevopsi commented on GitHub:
Also a minor "bug" with the .bashrc code is that there is not a line-break after the response from the server, which makes the terminal go:
can this be added too?
@yelodevopsi commented on GitHub:
I just found the bug:
It seems I don't have access to
tee /dev/null;on the buggy server
Is there a better way to write this maybe?
Btw: For the errors above, I think text-files are short enough to just not make the /tmp/-folder transfer not be utilized, thus making hello.txt work maybe?
@yelodevopsi commented on GitHub:
An update: It might be related to the system I'm using.
Ubuntu LTS 18.04.1 LTSandcurl 7.58.0Tested the same code on the buggy server and it fails with the same error as above.