> That would strongly imply this is a client bug. Something may be odd
> about his IE4 setup that causes it to send the boundary multiple times.
> Does this happen for him on every submit?
That I don't know, but it does occur on every multipart submit that I've
seen so far. It's MSIE 4.01 Win98, though it doesn't happen for me here
with that version. But, that MSFT oddity doesn't strike me as odd because
I've experienced similar problems trying to get AVI videos to play.
> With JServ? Which version, just for the record?
I'm using JRun 2.3.1 build 145 (JSP 0.92 version). I'll be moving to Tomcat
next year.
> > As another hack attempt at fixing this, I'm going to use
> > lastIndexOf("boundary=") instead of indexOf("boundary=") in your
> > method extractBoundary(). This should work in the case of a normal,
> > single boundary= situation -- and it does on my test systems -- but
> > MAY also work in this odd bug from this person's browser.
>
> Good thinking; should cause no harm in the standard case and may help in
> this odd case. Please let me know how it goes.
This worked! The debug statements still show that odd repeated boundary
bug, but the lastIndexOf seems to correctly handle it's buggy case, as well
as the normal case. The snippet looks like this now:
// Extracts and returns the boundary token from a line.
//
private String extractBoundary(String line)
{
// int index = line.indexOf("boundary=");
// IE 4.01 bug in one customer shows that the boundary= may appear multiple
// times (3 times in this case), so we use the "last" one, which is usually
// the one and only one for non-buggy browsers.
int index = line.lastIndexOf("boundary=");
if (index == -1) {
return null;
}
String boundary = line.substring(index + 9); // 9 for "boundary="
// The real boundary is always preceeded by an extra "--"
boundary = "--" + boundary;
return boundary;
}
Very odd stuff, but I thank you for the work you did on getting the base
functionality down.
David
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html