Support for redirected media urls
Support for redirected media urls

When a request is redirected, `get_headers()` returns the headers for all the responses in the request chain. When a header is specified in multiple responses, `get_headers()` returns the header value as an array of strings instead of a single string.

In effect, if the media url is redirected once, `$mediaType` could for example look like this: `[0 => "text/html; charset=UTF-8", 1 => "image/jpeg"]`. Hence the last element of the array should be used as the media type.

jeroendesloovere/vcard