-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Important things first, setting up HTTPS and password protection worked like a charm and I have really enjoyed using this project. Thank you!
After enabling SSL I have noticed that grabbing stills at /still/# will now only show the first quarter or so of a 640x480 image (68-72 kB). I poked around and noticed that client_write with SSL enabled for the still images gets called 5 times maxing out at 16 kB per write, but when I disable SSL the still images get written out in a single client_write. Looking at corrupted JPEG I see what look like multiple headers (AVI1, which I believe is for MJPEG AVI?)
I haven't looked further in the source, but I take it that since OpenSSL is currently configured with SSL_MODE_ENABLE_PARTIAL_WRITE that client_write is getting broken down into 16 kB chunks and each time the server attempts to send the next chunk it starts at the beginning of a new frame. I have removed this mode on my server and now the stills come through just fine. I have noticed wget complaining about TLS not being closed correctly and I moved from TLSv1_2_server_method (deprecated) to TLS_server_method, but I don't believe those have affected this image corruption issue.
Anyways, it was fun digging into that. Now I've got to grab a i2c thermometer and add temp tracking/graphing to all of this!