Islandora/tuque — pull request #83 by slangerx (2014-01-08 23:50:58+00:00)
Title: Windows-compatibility: Problems with php:// I/O streams

Some Windows-incompatibilities have crept into the Islandora codebase ([additional background can be found here](https://groups.google.com/d/msg/islandora/0MAhLDjbago/9knbOynlyIcJ "Islandora 7 and Windows: Patches and Tips")).

Windows seems to have a problem with some of the php:// I/O streams in this library, resulting in a flurry of Drupal error messages, such as:

* `Warning: curl_setopt(): DrupalTemporaryStreamWrapper::stream_cast is not implemented!`
* `Warning: curl_setopt(): cannot represent a stream of type Output as a STDIO FILE* in CurlConnection->getRequest()` [[Resource](http://www.php.net/manual/en/function.curl-setopt.php#58074 "PHP: curl_setopt")]
* `Warning: curl_setopt(): cannot represent a stream of type MEMORY as a STDIO FILE* in CurlConnection->putRequest()` [[Resource](http://bit.ly/18Qym02 "PHP API Error")]

This patch attempts to correct that.

*NOTE:* It might be more efficient to create a function that is called whenever OS detection is required (similar to https://github.com/Islandora/islandora/pull/441); but I had trouble getting that to work in this case.