View Single Post
  #1  
Old 09-28-2011, 01:53 PM
BlaveShmorby BlaveShmorby is online now
Registered User
 
Join Date: 09-27-2011
Posts: 1
HTTP Upload File ending boundary issue

Hi, I'm using an HTTP step to upload a file using the multipart/form-data post method, but I've run into an issue where the final boundary marker (------RANDOM_STUFF--) is inserted without a CRLF before it.

I'm working around it right now by appending a CRLF to the file, which works since the file size itself is never sent, but it complicates the build and I'd much rather do it in the one step I'd be able to do it in if there was a way to get that on there.

Is there an option I'm missing? Is this working elsewhere? I'm trying to upload to an ASP.NET 4.0 ashx handler and using the context.Request.Files collection. It works with the newline appended, does not without it, and I tracked it down to code in System.Web (System.Web.HttpMultipartContentTemplateParser.AtB oundaryLine() in the .NET reference source) that only considers a boundary if it's at the beginning of a line.

As far as I've been able to tell this is correct, a boundary must always occur at the beginning of a line (see: http://tools.ietf.org/html/rfc2046#section-5.1.1 which is referenced by rfc2388). Any help is appreciated, thanks!
Reply With Quote