This solves a couple of mystery bugs we've been trying to track down.  As 
it turns out, there never was any "off by one" error in the MIME parser -- 
the one extra byte was the CR character being transmitted by a web browser 
uploading a multipart stream to webcit.  We didn't get the CR character in 
Citadel because the newlines were already converted to unix style (LF 
only) by the time the MIME parser encountered them.  So when I started 
stripping off that "one extra byte" it was actually chopping off the 
payload if the lines were LF-terminated.  
   
 I know that the RFC mandates CRLF newlines, but our MIME parser is now 
smart enough to detect the newline style in use, and adapt to it.  
Basically, whatever type of newline it sees after a boundary is the same 
type it expects to see immediately prior to the next boundary.  
  

Reply via email to