tusc.sh icon indicating copy to clipboard operation
tusc.sh copied to clipboard

wrong connect to 443 port, it should be 'http://127.0.0.1/tusfiles/', not https

Open horizon365 opened this issue 6 months ago • 1 comments

``DEBUG=1 /usr/local/bin/tusc -H http://127.0.0.1 -f demo2.tar.gz -b /tusfiles/ -- -H "'Authorization: Bearer your_token_here'" HOST : http://127.0.0.1 HEADER: /tmp/tus.80om6h2Eue FILE : demo2.tar.gz SIZE : 168383995 KEY : e95f8758dd23235c16c158e05b317d0de6147fc2 CHKSUM: sha1 ZTk1Zjg3NThkZDIzMjM1YzE2YzE1OGUwNWIzMTdkMGRlNjE0N2ZjMg==

curl -sSLD /tmp/tus.80om6h2Eue -H 'Tus-Resumable: 1.0.0' -H 'Upload-Length: 168383995' -H 'Upload-Key: e95f8758dd23235c16c158e05b317d0de6147fc2' -H 'Upload-Checksum: sha1 ZTk1Zjg3NThkZDIzMjM1YzE2YzE1OGUwNWIzMTdkMGRlNjE0N2ZjMg==' -H 'Upload-Metadata: filename ZGVtbzIudGFyLmd6' -X POST http://127.0.0.1/tusfiles/

  • About to connect() to 127.0.0.1 port 80 (#0)
  • Trying 127.0.0.1...
  • Connected to 127.0.0.1 (127.0.0.1) port 80 (#0)

POST /tusfiles/ HTTP/1.1 User-Agent: curl/7.29.0 Host: 127.0.0.1 Accept: / Tus-Resumable: 1.0.0 Authorization: Bearer your_token_here Upload-Length: 168383995 Upload-Key: e95f8758dd23235c16c158e05b317d0de6147fc2 Upload-Checksum: sha1 ZTk1Zjg3NThkZDIzMjM1YzE2YzE1OGUwNWIzMTdkMGRlNjE0N2ZjMg== Upload-Metadata: filename ZGVtbzIudGFyLmd6

< HTTP/1.1 201 Created < Server: nginx/1.20.1 < Date: Wed, 25 Jun 2025 07:18:14 GMT < Content-Length: 0 < Connection: keep-alive < Location: https://127.0.0.1/tusfiles/bd9d56d01440c0d1bfd51a0c87413ad9 < Tus-Resumable: 1.0.0 < X-Content-Type-Options: nosniff < Cache-Control: no-store < Access-Control-Allow-Origin: * < Access-Control-Allow-Methods: OPTIONS, GET, POST, HEAD, PATCH < Access-Control-Allow-Headers: Content-Type, Upload-Length, Upload-Offset, Tus-Resumable, Upload-Metadata, X-Requested-With, Location, Authorization < Access-Control-Expose-Headers: Location, Upload-Offset, Upload-Length, Tus-Version, Tus-Resumable < Access-Control-Allow-Credentials: true <

  • Connection #0 to host 127.0.0.1 left intact

curl -sSLD /tmp/tus.80om6h2Eue -H 'Tus-Resumable: 1.0.0' -H 'Content-Type: application/offset+octet-stream' -H 'Content-Length: 168383995' -H 'Upload-Checksum: sha1 ZTk1Zjg3NThkZDIzMjM1YzE2YzE1OGUwNWIzMTdkMGRlNjE0N2ZjMg==' -H 'Upload-Offset: 0' -H 'Transfer-Encoding: chunked' --upload-file '/data/dc_science_data/union_visualization/demo2.tar.gz' --request PATCH 'https://127.0.0.1/tusfiles/bd9d56d01440c0d1bfd51a0c87413ad9'

  • About to connect() to 127.0.0.1 port 443 (#0)
  • Trying 127.0.0.1...
  • 拒绝连接
  • Failed connect to 127.0.0.1:443; 拒绝连接
  • Closing connection 0 curl: (7) Failed connect to 127.0.0.1:443; 拒绝连接

✖ Unfinished upload, please rerun the command to resume.``

horizon365 avatar Jun 25 '25 07:06 horizon365

hello thanks for ticket, as far as i know and can tell, tusc.sh doesn't do http->https upgrade or rewrites. so you may want to check if the server does that instead

adhocore avatar Jun 25 '25 14:06 adhocore