Forum Discussion
Filip_Verlaeckt
Mar 31, 2011Historic F5 Account
Automated secure file transfer
Hello
I am trying to solve the following problem:
What are the possibilities to organise file transfers initiated from a remote client to an internal server behind LTM?
R...
Joel_Moses
Mar 31, 2011Nimbostratus
HTTP/1.1 supports Content-Range on PUT requests; and it's client-specific as to whether this is supported by the uploading program... but it's possible to do resumable uploads over HTTP using this.
I've never had cause to use it, but curl (http://curl.haxx.se) supports PUT resumes over HTTP/HTTPS. It does this by first asking the server if the file exists and what size it is (HEAD /filename.ext HTTP/1.1), comparing the local file, and doing PUT with the correct Content-Range offset. This is "curl -C - -T " according to the man page. Curl is, of course, available for pretty much every platform.
I know it's no ideal solution to require a specific client in order to support resumes, but it'll work if a connecting client needs it.Update: Confirmed -- it absolutely does PUT uploads with Content-Range:
PUT /blah%2Etxt HTTP/1.1
Content-Range: bytes -1-/2352
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zl ib/1.2.3 libidn/0.6.5
Host: localhost:8800
Accept: */*
Content-Length: 2352
Expect: 100-continue
I've got no test environment handy to beat on this, but I'd be willing to bet with an HTTP/1.1 server and Curl, you've got a resumable upload if you want it.Update 2: There's no server support in IIS (any version) for the Content-Range header in WebDAV (where IIS keeps the support for HTTP PUT). To add it, you'd need a third-party WebDAV that supports resumable uploads, like the one from ITHit: http://www.webdavsystem.com/server . For UNIX/Linux, there's support in the mod_dav Apache module.
I tested the IIS way before I tested the Apache way -- bottom line is, the file I transferred partially was maintained on the server side and I was able to automatically resume using Curl.
So: To do a resumable upload using HTTPS, you'll need to install and configure a server that supports WebDAV/PUT uploads with Content-Range support, and you'll need to instruct your users to select a WebDAV or CLI tool that can upload in resumable form (ITHit WebDAV client or Curl). Hope this helps!
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects