1. Peter Sanchez
  2. zerigodns

Commits

Peter Sanchez  committed 20fe655

Manually add content-length in send_request - Hack. Look into later

  • Participants
  • Parent commits e545439
  • Branches default

Comments (0)

Files changed (1)

File zerigodns.py

View file
  • Ignore whitespace
         req_headers.update(headers)
         if method in ('POST', 'PUT'):
             req_headers['Content-Type'] = 'application/xml'
+            # XXX This is a hack. For some reason letting the Python 
+            # HTTPConnection.request() method set the Content-Length 
+            # header (default) was setting the length 2 bytes short.
+            # Manually set the length for now until we can look into it
+            req_headers['Content-Length'] = (len(request) + 2)
         
         if self.is_debug:
             print 'DEBUG (method): ', method