brutella / hap

The HomeKit Accessory Protocol (hap) implemented in Go
Apache License 2.0
355 stars 43 forks source link

use correct content-type for /pairings #46

Closed saljam closed 11 months ago

saljam commented 11 months ago

HomeKit expects an application/pairing+tlv8 content type for responses from /pairings, and fails to add the accessory if it gets something different.

You can reproduce the error by attempting to add an accessory as a user who is an admin but not the owner of the home. This will result in a flow that will attempt to use the AddPairing method. On all my devices this fails unless the content type is application/pairing+tlv8.

brutella commented 11 months ago

Thanks for the fix. 🎉 (Crazy that this actually worked before.)