• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

FORM Multipart - Error 500 Content Disposition Corrupted

New Here ,
Dec 05, 2007 Dec 05, 2007

Copy link to clipboard

Copied

Hi all,

Will appreciate help in this. We have upgraded our website from CF5 to CF8, and it is currently installed as a 30-day trial mode while we are finalizing the purchase of our license.

We found that a user have been encountering some errors on uploading files to our cfm - they keep hitting Error 500 Content Disposition Corrupt (the error appears in the browser). This error is not even logged in the CF application logs, does not trigger an exception and is not caught by the error page or error handling mechanism. This only occurs for this particular user/computer so far (but we are still in trial mode and have not rolled out fully) but we are keen to find a solution.

I've googled this problem and some MX users say this 'bug' occurs only for Firefox and is caused by the FORM or SUBMIT button not having a name. But, 1) The user is using MSIE7, and 2) we've put in the NAME attribute for the FORM and it still happens (no submit button used). So i'm stuck at how to fix this problem.

This is our declaration for the FORM:

<FORM action="#URL#" method=POST id=formsave name="formsavenm" enctype=multipart/form-data enablecab=Yes>

This is the error encountered by user upon uploading files using the <INPUT TYPE=FILE ... > item:

500 Content disposition corrupt: Content-Disposition: form-data; name=""

java.io.IOException: Content disposition corrupt: Content-Disposition: form-data; name=""
at com.oreilly.servlet.multipart.MultipartParser.extractDispositionInfo(MultipartParser.java:369)
at com.oreilly.servlet.multipart.MultipartParser.readNextPart(MultipartParser.java:268)
at coldfusion.filter.FormScope.fillForm(FormScope.java:181)
at coldfusion.filter.FusionContext.SymTab_initForRequest(FusionContext.java:430)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:33)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126)
at coldfusion.CfmServlet.service(CfmServlet.java:175)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

Any help will be very much appreciated. Thanks in advance.

Regards,
Andrew

Views

3.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 05, 2007 Dec 05, 2007

Copy link to clipboard

Copied

one thing jumping out at me right away:
use of #URL# in the form's action attribute. URL is a cf scope - you
should NOT name any of your variables URL.


---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 06, 2007 Dec 06, 2007

Copy link to clipboard

Copied

Azadi,

Sorry if it was confusing. It isn't really #URL#... its something rather long and boring so I shortened it only for the purpose of this posting... you're right I shouldn't have used URL.

Thanks,
Andrew

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 06, 2007 Dec 06, 2007

Copy link to clipboard

Copied

yeah, i thought so... i have tried playing with it, trying to reproduce
the error, but to no avail, probably just like you.... that user must
be on some strange browser set-up...

what's your cf version and OS?


---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 06, 2007 Dec 06, 2007

Copy link to clipboard

Copied

There is also the ... enablecab=Yes>. The documentation says that attribute is deprecated and *may* cause an error in later versions. I doubt its the issue here, but you should probably remove it anyway.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 06, 2007 Dec 06, 2007

Copy link to clipboard

Copied

Hi all,

Think this mystery is solved - the 500 Content Disposition Corrupt error happens when there is a FORM field that have name="" parameter with exception of TYPE=FILE.

Try submitting blank upload.cfm, no need to attach any files and errors are encountered.

Steps to reproduce:

upload.cfm (this causes error when submit is clicked):

<html><head><title>Test Upload</title></head><body>
<form action="uploadprocess.cfm" method=POST id=formsave name="formsavenm" enctype=multipart/form-data>
<input type=file name=ABC><br>
<input type=file name=DEF><br>
<input type=file name=GHI><br>
<input type=file id=aaa><br>
<input type=file id=bbb name=""><br>
<input type=text id=aaa name=""><br>
<input type=submit value="Submit">
</body>
</html>

upload-alt.cfm (no error encountered when submit is clicked):

<html><head><title>Test Upload Alt</title></head><body>
<form action="uploadprocess.cfm" method=POST id=formsave name="formsavenm" enctype=multipart/form-data>
<input type=file name=ABC><br>
<input type=file name=DEF><br>
<input type=file name=GHI><br>
<input type=file id=aaa><br>
<input type=file id=bbb name=""><br>
<input type=text id=aaa><br>
<input type=submit value="Submit">
</body>
</html>

uploadprocess.cfm

<html><head><title>Done</title></head><body>
<h3>Done.</h3>
<CFIF FORM.ABC IS NOT "">
<cffile ACTION="UPLOAD" DESTINATION="C:\tmp\file1.jpg" FILEFIELD="#FORM.ABC#" NAMECONFLICT="MakeUnique">
</CFIF>
<CFIF FORM.DEF IS NOT "">
<cffile ACTION="UPLOAD" DESTINATION="C:\tmp\file2.jpg" FILEFIELD="#FORM.DEF#" NAMECONFLICT="MakeUnique">
</CFIF>
<CFIF FORM.GHI IS NOT "">
<cffile ACTION="UPLOAD" DESTINATION="C:\tmp\file3.jpg" FILEFIELD="#FORM.GHI#" NAMECONFLICT="MakeUnique">
</CFIF>
</body>
</html>

Server settings:

Win2003+IIS6.0 (Fully WinUpdated)
CF8 8,0,0,176276 (w. CumulativeHotfix2)
JavaVM:1.6.0_01-b06
Req Timeout: Off
Max Post Data: 100Mb
Req Throttle Threshold: 4Mb
Req Throttle Memory: 400Mb

Unfortunately - my current code sets the NAME parameter dynamically in Javascript so I may have to rewrite that part. This worked fine in CF5.

Thanks to all who have replied so far.

Regards,
Andrew

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 06, 2007 Dec 06, 2007

Copy link to clipboard

Copied

LATEST
Thanks for the follow-up Andrew!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation