Update boundary string?

Issue #4 resolved
Chris AtLee
repo owner created an issue

From http://twitter.com/#!/emelois/status/13156054967779328 and http://pastebin.com/mquv0xh7:

314,316c310 < #---TUCAN (2) : Add the -- to match the actual boundary pattern < headers['Content-Type'] = "multipart/form-data; boundary=--%s" % boundary < #---TUCAN (2) END


headers['Content-Type'] = "multipart/form-data; boundary=%s" % boundary

Comments (1)

  1. Chris AtLee reporter

    From RFC 2046, section 5.1.1:

       The Content-Type field for multipart entities requires one parameter,
       "boundary". The boundary delimiter line is then defined as a line
       consisting entirely of two hyphen characters ("-", decimal value 45)
       followed by the boundary parameter value from the Content-Type header
       field, optional linear whitespace, and a terminating CRLF.
    

    Also from the grammar:

         dash-boundary := "--" boundary
                          ; boundary taken from the value of
                          ; boundary parameter of the
                          ; Content-Type field.
    
         delimiter := CRLF dash-boundary
    

    My reading of this is that poster is doing the right thing here.

  2. Log in to comment