Changeset 645 in ntrip for trunk/BNC/bncgetthread.cpp
- Timestamp:
- Dec 19, 2007, 10:07:55 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncgetthread.cpp
r629 r645 132 132 } 133 133 134 #define AGENTVERSION "1.5" 134 135 // Connect to Caster, send the Request (static) 135 136 //////////////////////////////////////////////////////////////////////////// … … 162 163 QString uName = QUrl::fromPercentEncoding(mountPoint.userName().toAscii()); 163 164 QString passW = QUrl::fromPercentEncoding(mountPoint.password().toAscii()); 164 QByteArray userAndPwd = uName.toAscii() + ":" + passW.toAscii(); 165 QByteArray userAndPwd; 166 167 if(!uName.isEmpty() || !passW.isEmpty()) 168 { 169 userAndPwd = "Authorization: Basic " + (uName.toAscii() + ":" + 170 passW.toAscii()).toBase64() + "\r\n"; 171 } 165 172 166 173 QUrl hlp; … … 173 180 if ( proxyHost.isEmpty() ) { 174 181 if (hlp.path().indexOf("/") != 0) hlp.setPath("/"); 175 reqStr = "GET " + hlp.path().toAscii() + 176 " HTTP/1.0\r\n" 177 "User-Agent: NTRIP BNC 1.5\r\n" 178 "Authorization: Basic " + 179 userAndPwd.toBase64() + "\r\n"; 182 reqStr = "GET " + hlp.path().toAscii() + " HTTP/1.0\r\n"; 180 183 } else { 181 reqStr = "GET " + hlp.toEncoded() + 182 " HTTP/1.0\r\n" 183 "User-Agent: NTRIP BNC 1.5\r\n" 184 "Authorization: Basic " + 185 userAndPwd.toBase64() + "\r\n"; 186 } 187 if (hlp.path().indexOf(".skl") > 0) { reqStr += "Host: " + hlp.host().toAscii() + "\r\n"; } 188 reqStr += "\r\n"; 184 reqStr = "GET " + hlp.toEncoded() + " HTTP/1.0\r\n"; 185 } 186 reqStr += "User-Agent: NTRIP BNC/" AGENTVERSION "\r\n" 187 "Host: " + hlp.host().toAscii() + "\r\n" 188 + userAndPwd + "\r\n"; 189 189 190 190 // NMEA string to handle VRS stream
Note:
See TracChangeset
for help on using the changeset viewer.