HTTP File Upload status bar and firewall...

C

Craig Coffey

-- WARNING, INCOMING LONG-WINDED MESSAGE --

Ok, so I went through all this trouble to actually create an HTTP
File Upload status bar using the MultipartRequest stuff from Jason
Hunter. It shows the filename, size, bytes transferred, and a neat
little status bar with percentage done. It works, and looks purdy.
So, then I put this up on our external server, and try it out,
and... It transfers the file, but there is no filename, size or bytes,
and the status bar stays at 0% until the file is done (or almost done)
and then jumps to 100% (or close to it) right at the end of the file
transfer.
The status bar works fine if I remotely control the machine, and
perform a local file transfer... Odd.
Let me explain, quickly, what I have done. Basically, when you say
you want to transfer a file, you get a popup window. This window has
2 frames; The top frame has the html form with the file field, and
the bottom from (which is size 0, and thus invisible) is the target of
that form. When the form is submitted, the file transfer is actually
happening in the invisible frame, and the top frame loads a JSP which
displays the status of the file transfer. The actuall file transfer
java class (MultipartRequest) keeps track of the status, stuffs it
into a simple object, and tosses that object into the session scope.
This object is looked for by the status JSP (which reloads every 5
seconds). When it finds this object, it grabs it, and uses the info
in it to display all the neat stuff I spoke of.
So... As I said, this works fine and dandy, and believe it or not,
does not affect the speed of the tranfer (I tested it against FTP
ALOT). But it doesn't seem to work through the firewall of our
external site. My theory is that the firewall is reading the entire
header to make sure that it is well formed before it passes it onto
the server itself. Since the file is actually PART of the header
(right?) it is loaded onto the firewall first, and THEN sent to the
server. The transfer to the server (since it is local) is very fast,
and thus the start to finish of the file transfer from the status bars
point of view is also very fast.
And, that is my dilema. This is just a theory, and therefore I ask,
is this theory sound? Does this sound like a firewall problem? Or
does it sound like I need to revisit my Java code?
I realize that this whole situation walks a fine line between
internet security and java programming. And if my theory is correct,
that it is actually on the OTHER side of that line, and thus not
appropriate for this ng, but I had to start somewhere, so please be
gentle with me :)

-Craig Coffey

PS- My REAL email is ccoffey@[email protected] (without the N0SP@M),
but I was forced to use Google for the post, and couldn't use a fake
email. Thnaks Yahoo! :)
 
T

Tim Ward

Craig Coffey said:
But it doesn't seem to work through the firewall of our
external site. My theory is that the firewall is reading the entire
header to make sure that it is well formed before it passes it onto
the server itself.

Firewall could well be collecting the whole file, in either direction, to
check for viruses etc. Attempts to measure progress at the client and at the
server could well produce totally different results.
 
H

Harald Hein

Craig Coffey said:
My theory is that the firewall is reading the entire
header to make sure that it is well formed before it passes it onto
the server itself.

Then verify your theory. Read then firewall documentation or get the
packet sniffer out of the toolbox and fire it up.
 
C

Craig Coffey

I don't have access to the firewall docs, since it is a dedicated
hosting solution. I don't even know which firewall they are using
(yet), but I am currently trying to get in touch with their security
expert to discuss this. My initial attempts to do so through the
standard customer service reps was met with a "..I seriously doubt it
has anything to do with our firewall...". Nice. Thanks for the help.
Next time, kiss me first. :p

Sniffer, Heh... I was afraid you were going to suggest that. *sigh*
Time to load snort on the server.

At least it sounds like I am on the right track.

Thanks,
-CC
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top