rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: Frank-Walter Steinmeier on August 10, 2012, 09:29:44 AM

Title: Resuming file transfers in a fancy way
Post by: Frank-Walter Steinmeier on August 10, 2012, 09:29:44 AM
Hi there!

You might know that some environments, especially the Flash player, do not support HTTP Headers containing the "range" element. I'm no expert when it comes to internet stuff, but I guess that's the way HFS also handles resuming downloads, right?

Could it be possible to also transmit partial files by GET parameters?

So that a request for "http://localhost/myFile.abc?range=500-600" only transmitts the bytes 500 to 600 from the requested file?


Many thanks in advance!
Title: Re: Resuming file transfers in a fancy way
Post by: rejetto on August 11, 2012, 09:32:34 PM
welcome!
the "range" is the only standard way of "resuming".
No browser will resume by the way you suggest.
I don't plan to implement anything like that, but you can fork the project of course.
With HFS 2.3 this could only theoretically be possible, but practically highly inefficient.
Title: Re: Resuming file transfers in a fancy way
Post by: Frank-Walter Steinmeier on August 11, 2012, 09:40:04 PM
Many thanks for your reply :D

I know that every sane person would use the range header element instead of appending some parameter to the URL itself, but it's the only option I can think of when the requesting application (not necessarily a web browser) may not use the range header element at all.

I wouldn't be too surprised if that's how streaming content into a flash application has actually been like this for years now.

I'll probably try to get around this by setting up a wrapper PHP script, but it would even be better without all that clutter on a small and tidy HFS server ;)
Title: Re: Resuming file transfers in a fancy way
Post by: rejetto on August 11, 2012, 09:51:24 PM
what's your case that you can't specify http headers?
Title: Re: Resuming file transfers in a fancy way
Post by: Frank-Walter Steinmeier on August 11, 2012, 09:56:41 PM
I either got something terribly wrong or an Adobe Flash application running in your browser is forbidden from using quite a lot of http header types, range among them. I understood most of them, but not how you can justify banning 'range' with 'security concerns' :-\

I'm currently working on a Flash application that streams 3D content (textures, geometry, ...) in a progressive manner, but since I cannot resume file transfers in Flash, the whole thing just got pretty ugly.
Title: Re: Resuming file transfers in a fancy way
Post by: rejetto on August 11, 2012, 10:43:20 PM
try to give a look at youtube, by seeking at the end of a long video.
you may need to sniff the request made by the flash app.
Title: Re: Resuming file transfers in a fancy way
Post by: Frank-Walter Steinmeier on August 12, 2012, 10:31:12 AM
Interesting idea.

I'll probably have to divide all the files into several chunks or set up a PHP script or something similiar.

The easiest thing would probably have been HFS doing the same for ?range=x-y as for a "real" range header.

By the way, just for my personal interest: Does HFS react to something you append like http://localhost/file.abc?someStuff at all?

Best regards
Title: Re: Resuming file transfers in a fancy way
Post by: rejetto on August 12, 2012, 12:49:20 PM
only if it's something it recognize, and it's mostly on folders