Skip to content

Commit

Permalink
Update README.me with busybox patch
Browse files Browse the repository at this point in the history
  • Loading branch information
roleoroleo authored Jul 16, 2024
1 parent d5b86d4 commit d72d5c9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,28 @@ The onvif server instead runs as CGI and therefore needs an http server that sup
- Run `/usr/local/bin/lighttpd -f /usr/local/etc/lighttpd.conf`
- Run your preferred client and test the address `http://YOUR_IP:8080/onvif/device_service`

## Use httpd from busybox
If you are using busybox I prepared a patch to use it with onvif_simple_server. The patch is valid for version 1.36.1.
```
diff -Naur busybox-1.36.1.ori/networking/httpd.c busybox-1.36.1/networking/httpd.c
--- busybox-1.36.1.ori/networking/httpd.c 2024-01-08 16:45:49.504118695 +0100
+++ busybox-1.36.1/networking/httpd.c 2024-01-08 16:52:14.701167800 +0100
@@ -2406,6 +2406,13 @@
}
cgi_type = CGI_NORMAL;
}
+ else if (is_prefixed_with(tptr, "onvif/")) {
+ if (tptr[6] == '\0') {
+ /* protect listing "cgi-bin/" */
+ send_headers_and_exit(HTTP_FORBIDDEN);
+ }
+ cgi_type = CGI_NORMAL;
+ }
#endif
if (urlp[-1] == '/') {
```

## Configuration
### onvif_simple_server
onvif_simple server supports the following options but you should use them just for debugging purpose
Expand Down

0 comments on commit d72d5c9

Please sign in to comment.