FYI, found a workaround for the struts/FormFile issue. The issue(s) a) Struts doesn't resolve the file when there is Charset information in the Content-Type header for a multipart/form-data post. b) Winhhtp on Vista (dll version 6) adds '; Charset=UTF-8' to the Content-Type
The fix; Add the text '; Charset=UTF-8' to the boundary Example in VB6 'Construct the Multipart Message to Send msg = "" msg = msg & "--" & bndry & "; Charset=UTF-8" & vbCrLf msg = msg & "Content-Disposition: form-data; name=""xmlFile""; filename=""select.xml""" & vbCrLf msg = msg & "Content-Type: text/xml" & vbCrLf & vbCrLf msg = msg & xmlDocument.xml & vbCrLf msg = msg & "--" & bndry & "; Charset=UTF-8" & "--" & vbCrLf .... xmlhttp.SetRequestHeader "Content-Type", "multipart/form-data; boundary=" & bndry & "; Charset=UTF-8" ... -----Original Message----- From: Meindert [mailto:[EMAIL PROTECTED] Sent: 22 June 2007 05:56 PM To: user@struts.apache.org Subject: FormFile is not getting populated when using winhttp on Vista Hi There, I'm setting the header in my VB application without charset property in the Content type; winhttp.SetRequestHeader "Content-Type", "multipart/form-data; boundary=xxx This was using fine and the file was received by struts in the FormFile object But now I'm trying the same on Vista with a newer version of winhttp, I can see in NetBeans that my content type has changed to multipart/form-data; boundary=xxx; Charset=UTF-8 The FormFile object isn't receiving the file anymore! Probably because of the added Charset Is there a way in Struts to intercept and remove the Charset property or a other way to make FormFile receive the file again? I was thinking along the line of overriding CommonsMultipartRequestHandler wit a controller but haven't got a clue what and how.. Also when I try to do some of the control changes I found in the mail archive I get validation errors (I'm using struts-config_1_2.dtd) Kind Regards Meindert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]