--- WWW/Library/Implementation/HTFile.c.orig	Mon Dec  8 04:38:04 2014
+++ WWW/Library/Implementation/HTFile.c	Sun May  1 23:58:48 2016
@@ -2455,6 +2455,13 @@
 #endif /* VMS */
 
     bin = HTCompressFileType(filename, ".", &rootlen) != cftNone;
+    /* Be more restrictive on OS/2 to avoid breaking CR/LF in local binary
+       files (the Win32 port apparently uses a different workaround to the
+       same effect) */
+#if defined(__EMX__)
+    if(strncmp(format->name, "text/", 5))
+	bin = 1;
+#endif
     fp = fopen(localname, FOPEN_MODE(bin));
 
 #ifdef VMS
