Return a string usable as a multipart boundary.
()
| 294 | |
| 295 | |
| 296 | def choose_boundary(): |
| 297 | """Return a string usable as a multipart boundary.""" |
| 298 | # follow IE and firefox |
| 299 | nonce = "".join([str(random.randint(0, sys.maxsize-1)) for i in (0,1,2)]) |
| 300 | return "-"*27 + nonce |
| 301 | |
| 302 | # This cut-n-pasted MimeWriter from standard library is here so can add |
| 303 | # to HTTP headers rather than message body when appropriate. It also uses |
no outgoing calls
no test coverage detected
searching dependent graphs…