My question was not about the exact choice of octet-stream or octetstream, it was how this code was written.

You return $this->mimetype. If you can load the guesser AND the guesser reports anything but 'application/octet-stream', you replace $this->mimetype with the guesser's response.

If the guesser reports 'application/octet-stream', you're just returning whatever is in $this->mimetype, which could come from anywhere, where we actually should be returning 'application/octetstream' (it seems).