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)
print 'DEBUG (method): ', method