Skip to content

Commit

Permalink
amcrest: Fix buggy htp firmware on some dahua
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Apr 3, 2024
1 parent e6cb411 commit 008e0ec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/amcrest/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/amcrest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/amcrest",
"version": "0.0.145",
"version": "0.0.146",
"description": "Amcrest Plugin for Scrypted",
"author": "Scrypted",
"license": "Apache",
Expand Down
7 changes: 7 additions & 0 deletions plugins/amcrest/src/amcrest-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,15 @@ export class AmcrestCameraClient {
continue;
if (ignore === boundaryEnd)
continue;
// dahua bugs out and sends this.
if (ignore === 'HTTP/1.1 200 OK') {
const message = await readMessage(stream);
this.console.log('ignoring dahua http bug', message);
continue;
}
if (ignore !== boundary) {
this.console.error('expected boundary but found', ignore);
this.console.error(response.headers);
throw new Error('expected boundary');
}

Expand Down

0 comments on commit 008e0ec

Please sign in to comment.