onvif icon indicating copy to clipboard operation
onvif copied to clipboard

action field in http header

Open RogerHardiman opened this issue 3 years ago • 0 comments

I've got a camera that this library does not work with. ONVIF replies come back as empty replies on the HTTP connection with no XML.

I tracked it down to this library not putting an "action" field in the HTTP Content-Type header.

This is what ODM does POST /onvif/device_service HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8; action="http://www.onvif.org/ver10/device/wsdl/GetSystemDateAndTime" Host: 192.168.1.15 Content-Length: 920 Accept-Encoding: gzip, deflate Connection: Close

Adding the action value makes this library work.

I've fixed it in the 'roger' branch. Would like a code review. It is not very efficient. It parses the XML it is about to send so it can make the action string. But it works

RogerHardiman avatar Feb 28 '22 13:02 RogerHardiman