This is intended behavior.
When you make an HTTP request, the server normally returns code 200 OK
. If you set If-Modified-Since
, the server may return 304 Not modified
(and the response will not have the content). This is supposed to be your cue that the page has not been modified.
The authors of the class have foolishly decided that 304
should be treated as an error and throw an exception. Now you have to clean up after them by catching the exception every time you try to use If-Modified-Since
.