Changeset 8203 in ntrip for trunk/BNC/src/bncnetqueryv1.cpp
- Timestamp:
- Dec 11, 2017, 2:42:03 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncnetqueryv1.cpp
r6787 r8203 91 91 _socket = 0; 92 92 _status = error; 93 emit newMessage(_url.path().to Ascii().replace(0,1,"")94 + ": " + errStr.to Ascii(), true);93 emit newMessage(_url.path().toLatin1().replace(0,1,"") 94 + ": " + errStr.toLatin1(), true); 95 95 return; 96 96 } … … 157 157 _socket = 0; 158 158 _status = error; 159 emit newMessage(_url.path().to Ascii().replace(0,1,"")159 emit newMessage(_url.path().toLatin1().replace(0,1,"") 160 160 + ": Write timeout", true); 161 161 return; … … 208 208 // Send Request 209 209 // ------------ 210 QString uName = QUrl::fromPercentEncoding(_url.userName().to Ascii());211 QString passW = QUrl::fromPercentEncoding(_url.password().to Ascii());210 QString uName = QUrl::fromPercentEncoding(_url.userName().toLatin1()); 211 QString passW = QUrl::fromPercentEncoding(_url.password().toLatin1()); 212 212 QByteArray userAndPwd; 213 213 214 214 if(!uName.isEmpty() || !passW.isEmpty()) { 215 userAndPwd = "Authorization: Basic " + (uName.to Ascii() + ":" +216 passW.to Ascii()).toBase64() + "\r\n";215 userAndPwd = "Authorization: Basic " + (uName.toLatin1() + ":" + 216 passW.toLatin1()).toBase64() + "\r\n"; 217 217 } 218 218 … … 220 220 if ( proxyHost.isEmpty() ) { 221 221 if (_url.path().indexOf("/") != 0) _url.setPath("/"); 222 reqStr = "GET " + _url.path().to Ascii() + " HTTP/1.0\r\n"222 reqStr = "GET " + _url.path().toLatin1() + " HTTP/1.0\r\n" 223 223 + "User-Agent: NTRIP BNC/" BNCVERSION " (" BNC_OS ")\r\n" 224 + "Host: " + _url.host().to Ascii() + "\r\n"224 + "Host: " + _url.host().toLatin1() + "\r\n" 225 225 + userAndPwd + "\r\n"; 226 226 } else { 227 227 reqStr = "GET " + _url.toEncoded() + " HTTP/1.0\r\n" 228 228 + "User-Agent: NTRIP BNC/" BNCVERSION " (" BNC_OS ")\r\n" 229 + "Host: " + _url.host().to Ascii() + "\r\n"229 + "Host: " + _url.host().toLatin1() + "\r\n" 230 230 + userAndPwd + "\r\n"; 231 231 } … … 243 243 _socket = 0; 244 244 _status = error; 245 emit newMessage(_url.path().to Ascii().replace(0,1,"")245 emit newMessage(_url.path().toLatin1().replace(0,1,"") 246 246 + ": Write timeout", true); 247 247 return; … … 294 294 _socket = 0; 295 295 _status = error; 296 emit newMessage(_url.path().to Ascii().replace(0,1,"")296 emit newMessage(_url.path().toLatin1().replace(0,1,"") 297 297 + ": Response timeout", true); 298 298 return; … … 303 303 _socket = 0; 304 304 _status = error; 305 emit newMessage(_url.path().to Ascii().replace(0,1,"")305 emit newMessage(_url.path().toLatin1().replace(0,1,"") 306 306 + ": Wrong caster response\n" 307 + response.join("").to Ascii(), true);307 + response.join("").toLatin1(), true); 308 308 } 309 309 }
Note:
See TracChangeset
for help on using the changeset viewer.