[ create a new paste ] login | about

Link: http://codepad.org/JPTg9boK    [ raw code | fork | 1 comment ]

blanu - Python, pasted on Aug 27:
1
2
3
4
5
6
7
8
9
10
11
      l=int(self.headers['content-length'])
      ct=self.headers['content-type']
      mfdb='multipart/form-data; boundary='
      if ct and mfdb in ct:
        ctl=len(ct)-len(mfdb)
        l=l-(((ctl+2)*2)+2) # top border (plus \r\n), bottom border (plus\r\n),$
      for fpheader in fp.headers:
        l=l-len(fpheader)
        l=l-len(fp.headers[fpheader])
        l=l-4 # ": " and "\r\n"
      l=l-8 # I don't know, but the numbers always seem to be off by 8


Create a new paste based on this one


Comments:
posted by moses on Nov 17
test
reply