prefix is ignored if add_to_http_hdrs is true.
(self, ctype=None, plist=[], prefix=1,
add_to_http_hdrs=0, content_type=1)
| 406 | self._headers = [] |
| 407 | |
| 408 | def startbody(self, ctype=None, plist=[], prefix=1, |
| 409 | add_to_http_hdrs=0, content_type=1): |
| 410 | """ |
| 411 | prefix is ignored if add_to_http_hdrs is true. |
| 412 | """ |
| 413 | if content_type and ctype: |
| 414 | for name, value in plist: |
| 415 | ctype = ctype + ';\r\n %s=%s' % (name, value) |
| 416 | self.addheader("Content-Type", ctype, prefix=prefix, |
| 417 | add_to_http_hdrs=add_to_http_hdrs) |
| 418 | self.flushheaders() |
| 419 | if not add_to_http_hdrs: self._fp.write("\r\n") |
| 420 | self._first_part = True |
| 421 | return self._fp |
| 422 | |
| 423 | def startmultipartbody(self, subtype, boundary=None, plist=[], prefix=1, |
| 424 | add_to_http_hdrs=0, content_type=1): |
no test coverage detected