Closed dmolavi closed 2 years ago
On further inspection, reef-pi does send the www-form-urlencoded attribute, BUT in the authentication portion (which is redacted in my above screenshot), there is a difference. Reef-pi sends: Authorization: Digest username="\<myuser>", realm="\<this matches>", nonce="", uri="/restapi/relay/outlets/1/state/", cnonce="\<value>", nc=value, qop=auth, response="\<value>", opaque="", algorithm="MD5"
The working request sends: Authorization: Digest username="\<myuser>", realm="\<this matches>", nonce="\<value>", uri="/restapi/relay/outlets/1/state/", algorithm="MD5", response="\<value>", opaque="\<value>"
You can see where they differ...I can email you the captures directly if you'd like.
these values are set from infering the dli response https://github.com/reef-pi/drivers/blob/master/dli/config.go its still not clear why its failing though
dli_fix.txt Patch file attached. This should fix it. Works on my DLI switch.
In a nutshell, even though the code looks like it includes the 'www-form-urlencoded' header, it doesn't appear to. See the attached screenshot. I've attached 2 screenshots - one of a bad PUT (from reef-pi) and another with a good one, from PostMan. Note how the request is different .