Skip to main content
May 2, 2008
Question

Multi-part forms and server-side redirects

  • May 2, 2008
  • 2 replies
  • 534 views
Hello all you wonderful CF people. There is already a topic about this, but we're still a bit stumped. In most of our testing we are using the development version of CF8.01 (8,0,1,195765) and the built in web-server on Windows XP. We have also tried it on a local development server on Windows 2003. We have a form that uses the encoding type "multipart/form-data". After the form is posted and any files are uploaded, we do a server-side redirect using Fusebox's 'relocate' verb. This uses PageContext.forward() "behind the scenes".

When we run this application on CF8 and post the form, we get a "Corrupt form data: premature ending" error message in the browser. This appears to be a known bug (according to one Adobe forum thread), but I can't find a bug record anywhere on the Adobe site about it. The one thread indicated that it was fixed in CF version 8.01, but we're still seeing the problem even after updating.

We know about the jvm adjustment (coldfusion.markResetForMultiPart) that makes the CF8 uploading functionality work like CF7, but we would very much like to take advantage of the new uploading power of CF8. We can decrease our use of server-side redirects, but there are a few cases where removing the server-side redirect isn't very plausible.

Anyone have any suggestions? Does anyone know where to track this bug, if it is indeed already listed somewhere? Thanks in advance.

T
    This topic has been closed for replies.

    2 replies

    May 27, 2008
    Any luck with this issue? I'm having the same problem.

    Thanks
    Jeff
    May 27, 2008
    Hey Jeff, yes, it is still an issue.

    For two of our major applications we still are upgrading to CF8 and we are using the java VM workaround (Google search 'coldfusion.markResetForMultiPart'). However, for one application we would absolutely LOVE to take advantage of the improvements in uploading within CF8, and this workaround negates that.

    I've tried to attach some code that reproduces the error on any CF8 machines that do not have the workaround enabled.

    T

    Inspiring
    May 19, 2008
    Does the redirect have to be a valid 302 redirect? Can you use JS on the client to just send the browser elsewhere? If it doesn't have to be a valid 302, there are a lot of ways to do this.
    May 19, 2008
    We're not doing a 302/browser/client side redirect, but a server side. The ColdFusion page stops processing once it reaches the getPageContext.forward() command. Instead, it starts processing the page at the new URL.

    The server side redirect is handy because all the request variables are available, unlike a client-side redirect. The problem is that with CF8 and multi-part forms, the redirects fail.