Merge pull request #484 from tianhao64/master
Add user-agent header when connecting to vsphere
This commit is contained in:
@@ -1312,7 +1312,8 @@ class SoapStubAdapter(SoapStubAdapterBase):
|
||||
|
||||
headers = {'Cookie' : self.cookie,
|
||||
'SOAPAction' : self.versionId,
|
||||
'Content-Type': 'text/xml; charset={0}'.format(XML_ENCODING)}
|
||||
'Content-Type': 'text/xml; charset={0}'.format(XML_ENCODING),
|
||||
'User-Agent' : 'pyvmomi'}
|
||||
if self._acceptCompressedResponses:
|
||||
headers['Accept-Encoding'] = 'gzip, deflate'
|
||||
req = self.SerializeRequest(mo, info, args)
|
||||
|
||||
Reference in New Issue
Block a user