[squeak-dev] uploading a file to a KomHttpServer via WebClient

Chris Muller ma.chris.m at gmail.com
Tue Jan 18 05:08:04 UTC 2011


Section 2.10 of RFC 2045 defines "Lines" as:

    '"Lines" are defined as sequences of octets separated by a CRLF sequences.'

When I try to upload a file to a KomHttpServer via a WebClient, I get
a timeout because the last line of
HttpRequest>>#multipartFormFieldsDo: expects a CRLF after the last
body part and boundary indicator of a multipart message.

However, WebClient's WebUtils class>>#encodeMultipartForm:boundary:
does not emit a CRLF after the final boundary, causing the
KomHttpServer to timeout waiting for it.

I must admit, RFC 2045's definition of a "line" is ambiguous, to me,
in terms of whether the boundary indicator after the LAST body part
should be "separated" by a CRLF sequence.

Any HTTP experts out there know the answer to that?  I need to know
whether WebClient or KomHttpServer should be fixed..

Thanks,
  Chris



More information about the Squeak-dev mailing list