Sample code for doing a “chunked†webfile HTTP d ownload, andthen stream to HTTP upload to anothe

G

Greg Hauptmann

Hi,

QUESTION: Does anyone have sample code that shows how to do an (a)
chunked HTTP file download, and then (b) stream this into the HTTP
uploading of this to another web application with a file upload
controller?

BACKGROUND
* I've been trying to "stream" an existing webpage to a separate web
application, using normal http request response approach.
* The issue I'm hitting is that there are some times when preparing
the upload, whereby the source webserver where I'm sourcing the file
from does NOT set the **content-length**, hence I can't set this for
the upload.
* My thinking is that to get around this the approach might be to use
HTTP chunked mode (however I haven't had any experience with this).
I'm trying to avoid (a) having to download the file to disk first, but
also (b) store the whole file up in memory before uploading
* The upload has to be a POST

thanks
 
T

Tony Arcieri

[Note: parts of this message were removed to make it a legal post.]

On Tue, Dec 8, 2009 at 11:22 AM, Greg Hauptmann <
Hi,

QUESTION: Does anyone have sample code that shows how to do an (a)
chunked HTTP file download, and then (b) stream this into the HTTP
uploading of this to another web application with a file upload
controller?

This shouldn't be too difficult to do with either Rev or EventMachine, which
both provide evented HTTP clients and servers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top