Skip to content

Conversation

xtelinco
Copy link

As mentioned in this issue #34 the Hikvision server code generates these types of errors when processing the stream of events from Hikvision cameras.

I have tracked this down to the Hikvision camera sending bogus --boundary lines at the end of some XML. So the mimepart parser sees this as an error and misses an event. This is because the mimepart parser sees

--boundary
--boundary
Content-Type: ...

I have added a filter to detect this and strip the bogus boundary.

Also the event stream generates image/jpeg type mime entries for some messages. These were completely unhandled and were processed as XML. These changes inspect the Content-Type header and only process the messages as XML if the content type suggests so. If the Content-Type is 'image/jpeg' you can now optionally send this to MQTT as well.

@xtelinco xtelinco marked this pull request as ready for review March 14, 2025 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant