Ok, that is the result I was expecting. Now I wonder if the camera shuts down the connection immediately, or if it sends more data along as things change (D-Link camera does this). Don't know if this is easy to test with a browser, but you could use wget on the command line: wget <url> and see if it finishes, or just keeps going (stop with CTRL+C in that case).
It's quite easy to a motion detection to this template, but depending on how the camera uses the connection, I might have to make a small code change first.
br,
sambuca