CB-6928: Open output stream only if it's necessary.
CB-6928: Handle 304 status code
CB-6928: Add new error code to documentation
Merge branch 'CB-6928' (This closes #32)