Redirects now seem to work.

As long as the cache is empty, redirects work.

To do:
Octet-stream
Not open the defs file
Clean code.
(Persistent connection).