- Timestamp:
- Jan 19, 2009, 7:25:27 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncnetqueryv2.cpp
r1463 r1509 90 90 // Default scheme and path 91 91 // ----------------------- 92 QUrl urlLoc(url);93 if ( urlLoc.scheme().isEmpty()) {94 urlLoc.setScheme("http");92 _url = url; 93 if (_url.scheme().isEmpty()) { 94 _url.setScheme("http"); 95 95 } 96 if ( urlLoc.path().isEmpty()) {97 urlLoc.setPath("/");96 if (_url.path().isEmpty()) { 97 _url.setPath("/"); 98 98 } 99 99 … … 112 112 // --------------- 113 113 QNetworkRequest request; 114 request.setUrl( urlLoc);115 request.setRawHeader("Host" , urlLoc.host().toAscii());114 request.setUrl(_url); 115 request.setRawHeader("Host" , _url.host().toAscii()); 116 116 request.setRawHeader("Ntrip-Version", "Ntrip/2.0"); 117 117 request.setRawHeader("User-Agent" , "NTRIP BNC/1.7"); 118 if (!urlLoc.userName().isEmpty()) { 118 if (!_url.userName().isEmpty()) { 119 QString uName = QUrl::fromPercentEncoding(_url.userName().toAscii()); 120 QString passW = QUrl::fromPercentEncoding(_url.password().toAscii()); 119 121 request.setRawHeader("Authorization", "Basic " + 120 (urlLoc.userName() + ":" + urlLoc.password()).toAscii().toBase64());122 (uName + ":" + passW).toAscii().toBase64()); 121 123 } 122 124 if (!gga.isEmpty()) {
Note:
See TracChangeset
for help on using the changeset viewer.