Subject: | Final MIME delimiter requires following linefeed |
HTTP::Message parses MIME messages. As part of the parsing process, the
subroutine _parts strips of the final delimiter and any following text
using the line:
$str =~ s/\r?\n--\Q$b\E--\r?\n.*//s;
where $str holds the message and $b the boundary.
This pattern requires at least a \n after the boundary in order to match.
I am trying to interact with a web service, using the XML::Compile::SOAP
modules, which use HTTP::Message, where the MIME response ends
immediately after the final --boundary-- delimiter without any further
line-ending.
According to rfc2045 (and following), no characters following the final
delimiter are necessary and the linefeed is not part of the delimiter:
multipart-body := [preamble CRLF]
dash-boundary transport-padding CRLF
body-part *encapsulation
close-delimiter transport-padding
[CRLF epilogue]
transport-padding := *LWSP-char
; Composers MUST NOT generate
; non-zero length transport
; padding, but receivers MUST
; be able to handle padding
; added by message transports.
close-delimiter := delimiter "--"
I'm using HTTP::Message 5.835, perl 5.10.1, Cygwin_NT-6.1
Thanks,
Richard