shithub: drawterm-fdroid

Download patch

ref: f54a88de4293990bd8e1cf05e6e4752e5e4f771f
parent: ebb16275cc0193d2caa3985f3914c08bc0e24e5f
author: aiju <devnull@localhost>
date: Tue Jul 10 11:36:30 EDT 2018

drawterm x11: MIME types need case sensitivity training (thanks echoline)

--- a/gui-x11/x11.c
+++ b/gui-x11/x11.c
@@ -1150,11 +1150,11 @@
 		if(name){
 			if(strcmp(name, "TIMESTAMP") == 0){
 				/* nothing */
-			}else if(strncmp(name, "image/", 6) == 0){
+			}else if(strncasecmp(name, "image/", 6) == 0){
 				/* nothing */
-			}else if(strcmp(name, "text/html") == 0){
+			}else if(strcasecmp(name, "text/html") == 0){
 				/* nothing */
-			}else if(strcmp(name, "text/plain") == 0 || strcmp(name, "text/plain;charset=UTF-8") == 0){
+			}else if(strcasecmp(name, "text/plain") == 0 || strcasecmp(name, "text/plain;charset=UTF-8") == 0){
 				goto text;
 			}else
 				iprint("cannot handle selection request for '%s' (%d)\n", name, (int)xe->target);