Re: [tclwebtest] file upload
Status: Abandoned
Brought to you by:
tils
From: Kolja L. <ma...@ko...> - 2005-01-04 11:02:16
|
Hi again seems like I found the problem. Tomcat needs \r\n in the request instead of simple \n. I dont know what the RFC says about this and it's well possible AOLServer doesnt mind, but I would suggest changing the code like this (I dont have access to the cvs, so maybe Peter or Tilman should do that): (proc do_request about line 2355 in tclwebtest.tcl) # Decide if we add parameters for a POST operation if { [string equal $enctype "multipart/form-data"] } { set query_content {} set boundary "-----NEXT_PART_[clock seconds].[pid]" foreach { elmname filename } $files { set fd [open $filename r] fconfigure $fd -translation binary if { [catch { read $fd [file size $filename] } data] } { return -code error $data } close $fd append query_content "--$boundary\r\nContent-Disposition: form-data;\ name=\"$elmname\"; filename=\"[file tail $filename]\"\r\n\r\n$data\r\n" } foreach { elmname data } $query_key_values { append query_content "--$boundary\r\nContent-Disposition: form-data;\ name=\"$elmname\"\r\n\r\n$data\r\n" } append query_content "--${boundary}--" Bye, Kolja Am Tue, 04 Jan 2005 11:26:07 +0100 schrieb Kolja Lehmann <ma...@ko...>: > Hi > I am using the 1.0 version of tclwebtest and try to upload files. It > doesnt seem to work, although the POST request generated seems good to > me. Still the receiving tomcat server doesnt see the file nor any other > field i submitted. Are there any known issues with that? > > Kolja > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Tclwebtest-general mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tclwebtest-general |