Forum OpenACS Development: Re: Naviserver Post Body Lost if Over a Certain Size

Collapse
Posted by Gustaf Neumann on
do i understand correctly, the problem happens with POST requests with large textarea content, but not with uploaded files. My suspicion is that it has to do with the content-type, that the browser switches between *www-form-urlencoded" and "multipart/form-data". can you check the content-type?

With which version of naviserver and which browser are you testing?

Collapse
Posted by Gustaf Neumann on
Never mind about the detail info: i was able to reproduce the issue. The problem was - as suspected - the handling of www-form-urlencoded with spooled content. This is now fixed in the updated version of NaviServer.
Collapse
Posted by Dave Bauer on
Thanks for your quick response that was very helpful!
Collapse
Posted by Dave Bauer on
Gustaf, Thanks for that fix. We added the form.tcl to our naviserver . Should that work? We are getting an error message of

wrong # args: should be "try code ?catch? ?handler? ?finally? ?cleanup?"
while executing
"try {
set content [read $fp]
#ns_log warning "===== ns_parseformfile reads $file $form $contentType -> [string length $content..."
(procedure "ns_parseformfile" line 17)

We added the form.tcl so we did not have to recompile naviserver. I didn't notice any changes to other files for this fix.

Collapse
Posted by Gustaf Neumann on
what version of "try" are you using? "try" is builtin in tcl 8.6 [1] and there is an emulation in tcllib for 8.5. None of these versions provide the error message above.

[1] https://www.tcl.tk/man/tcl/TclCmd/try.htm