Ticket #6597: 6597-datadirect-win32.3.patch
File 6597-datadirect-win32.3.patch, 2.3 KB (added by , 16 years ago) |
---|
-
libs/libmythtv/datadirect.cpp
1011 1011 QMutexLocker locker(&user_agent_lock); 1012 1012 command = QString( 1013 1013 "wget --http-user='%1' --http-passwd='%2' --post-file='%3' " 1014 "--header='Accept-Encoding:gzip' %4 " 1015 "--user-agent='%5' --output-document=- ") 1014 " %4 --user-agent='%5' --output-document=- ") 1016 1015 .arg(userid).arg(password).arg(postFilename).arg(ddurl) 1017 1016 .arg(user_agent); 1018 1017 } 1019 1018 1019 #ifdef USING_MINGW 1020 // Allow for double quotes in userid and password (shell escape) 1021 command.replace("\"","^\""); 1022 // Replace single quotes with double-quotes 1023 command.replace("'", "\""); 1024 // Unescape unix-escaped single-quotes (which just became "\"") 1025 command.replace("\"\\\"\"","'"); 1026 // gzip on win32 complains about broken pipe, so don't use it 1027 #else 1020 1028 // if (!SHOW_WGET_OUTPUT) 1021 1029 // command += " 2> /dev/null "; 1022 1030 1023 command += " | gzip -df"; 1031 command += " --header='Accept-Encoding:gzip' | gzip -df"; 1032 #endif 1024 1033 1025 1034 if (SHOW_WGET_OUTPUT) 1026 1035 VERBOSE(VB_GENERAL, "command: "<<command<<endl); … … 1087 1096 .arg(GetUserID().replace('\'', "'\\''")) 1088 1097 .arg(GetPassword().replace('\'', "'\\''")).arg(postFilename) 1089 1098 .arg(ddurl).arg(user_agent).arg(resultFilename); 1099 #ifdef USING_MINGW 1100 // Allow for double quotes in userid and password (shell escape) 1101 command.replace("\"","^\""); 1102 // Replace single quotes with double-quotes 1103 command.replace("'", "\""); 1104 // Unescape unix-escaped single-quotes (which just became "\"") 1105 command.replace("\"\\\"\"","'"); 1106 #endif 1090 1107 } 1091 1108 1092 1109 if (SHOW_WGET_OUTPUT) 1093 1110 VERBOSE(VB_GENERAL, "command: "<<command<<endl); 1111 #ifndef USING_MINGW 1094 1112 else 1095 1113 command += " 2> /dev/null "; 1114 #endif 1096 1115 1097 1116 myth_system(command); 1098 1117 … … 1992 2011 command += "--output-document="; 1993 2012 command += (documentFile.isEmpty()) ? "- " : dfile; 1994 2013 2014 #ifdef USING_MINGW 2015 command.replace("'", "\""); 2016 #endif 2017 1995 2018 if (SHOW_WGET_OUTPUT) 1996 2019 VERBOSE(VB_GENERAL, "command: "<<command<<endl); 1997 2020 else