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

corrupt form data error

Explorer ,
May 16, 2008 May 16, 2008
Hi,

I am getting the following error on one of my cfm pages. This is a new installation of CF 8, developer editon.

500
Corrupt form data: no leading boundary: != -----------------------------7d816ff270268


java.io.IOException: Corrupt form data: no leading boundary: != -----------------------------7d816ff270268
at com.oreilly.servlet.multipart.MultipartParser.<init>(MultipartParser.java:176)
at com.oreilly.servlet.multipart.MultipartParser.<init>(MultipartParser.java:95)
at coldfusion.filter.FormScope.fillMultipart(FormScope.java:170)
at coldfusion.filter.FusionContext.SymTab_initForRequest(FusionContext.java:435)
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:286)
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)

The form on the page had enctype="multipart/form-data" on it (but no file inputs), but I removed the enctype altogether and it didn't help.

Does anyone have any idea how to fix this?

Craig
2.2K
Translate
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 ,
May 16, 2008 May 16, 2008
that error is related to file uploads only.
sure there is not file field still lurking around? or some java applet
used to upload files?

where does the form submit to? do you send form data to a
component/function for processing?

check that your hard disk where cf has its temp dir is not getting too
full...

are you sure you are not reloading/accessing the form's action page,
without going through the actual form?




Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
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
Explorer ,
May 16, 2008 May 16, 2008
Hi Azadi,

I have fixed it. I hadn't removed the correct enctype="multipart/form-data" from the form. Now that I have removed it, the page works again.

So, how do I upload a file in CF 8 if I can't set the form to use enctype="multipart/form-data" ??

Craig
Translate
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 ,
May 16, 2008 May 16, 2008
sure you can! and you must if you are uploading files with your form.

just make sure on your form's action page you test if a file was
submitted [i.e. by checking len(trim(form.filefiledname))] before using
cffile on it.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
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
Explorer ,
May 16, 2008 May 16, 2008
Hmm, I have never seen any browser that will correctly upload a file without enctype="multipart/form-data" on the form tag; I thought that was one of the basic principles of HTML and HTTP?

I will give it a try.

Craig
Translate
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 ,
May 16, 2008 May 16, 2008
maybe i was not clear or you misread my answer:

with my "sure you can!" excamation i was referring to your "if I can't
set the form to use enctype='multipart/form-data'?" question.

what i meant is: you MUST use the proper enctype in your form to upload
files in cf.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
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
Explorer ,
May 16, 2008 May 16, 2008
Yes, there's a confusion somewhere.

I can see that I cannot put enctype="multipart/form-data" on a cfm page or it will throw an error, but I need to use enctype="multipart/form-data" to upload a file. So, how can I upload a file with CF?

Craig
Translate
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 ,
May 16, 2008 May 16, 2008
let's start by having a look at your form code and action page code,
shall we? posted your code -form page and action page code - it will
help a lot.

add <cfdump var="#form#"> as the very first line on your actions page
and see what it has in there, or post the dump here if you o not know
what to look for...

on your action page, are you checking if a file has been selected for
uploading before using cffile tag or not? could your error be due to
your trying to use cffile when no file has been selected for uploading?

also, just to check and rule out other possible culprits:
- which CF version are you using?
- which OS and version are you using? both on the server and on your
client pc.
- what language is your client OS? server OS?
- does the file name you uploading or the directory it resides in on
your client pc have non-western characters in it?
- do you see the same issue in other browsers? have you tested it with
other browsers?



Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
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
Explorer ,
May 16, 2008 May 16, 2008
LATEST
Hi Azadi,

Just to clarify, I have been using CF 5 for six years or more. I'm just confused about this change in behaviour with CF 8. As I said, the page works fine on CF 5 and, even though there is enctype="multipart/form-data" in the form tag, there is no cffile in the form. What I want to know is:
1). Why does this not work in CF 8 when it worked in CF 5?
2). How can I upload a file in CF 8 if I can't put enctype="multipart/form-data" in the form?

I hope that clarifies.

Craig
Translate
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