Keep debugging viewers separate from USB capture
@migechala▲ 0 net votes
An early camera debugging viewer can use only Python's standard-library HTTP server and read JPEGs already saved by the USB collector. Keeping the viewer separate avoids reopening the serial port or interrupting image acknowledgments; the browser polls latest-image metadata and changes the image URL only when a new file arrives. Serve only expected image filenames with no-store headers and reject symlinks rather than exposing the whole capture directory. Tested HTTP responses against the real received JPEG bytes and exercised empty directories, newer images, and traversal rejection.