@@ -59,6 +59,8 @@ TCByte* WinWebClientPlugin::fetchURL(const char* url, int& length, TCWebClient*
59
59
}
60
60
std::wstring hostName (urlComp.lpszHostName , urlComp.dwHostNameLength );
61
61
std::wstring urlPath (urlComp.lpszUrlPath , urlComp.dwUrlPathLength );
62
+ std::wstring extraInfo (urlComp.lpszExtraInfo , urlComp.dwExtraInfoLength );
63
+ urlPath += extraInfo;
62
64
HttpHandle hConnect = WinHttpConnect (hSession.get (),
63
65
hostName.c_str (),
64
66
INTERNET_DEFAULT_HTTPS_PORT,
@@ -135,11 +137,6 @@ TCByte* WinWebClientPlugin::fetchURL(const char* url, int& length, TCWebClient*
135
137
{
136
138
return NULL ;
137
139
}
138
- if (dwStatusCode != 200 )
139
- {
140
- webClient->parseErrorResultCode ((int )dwStatusCode);
141
- return NULL ;
142
- }
143
140
dwSize = 0 ;
144
141
WinHttpQueryHeaders (hRequest.get (),
145
142
WINHTTP_QUERY_RAW_HEADERS_CRLF,
@@ -162,6 +159,11 @@ TCByte* WinWebClientPlugin::fetchURL(const char* url, int& length, TCWebClient*
162
159
wstringtoutf8 (utf8HeaderData, headerData);
163
160
std::string headers = " \r\n " + utf8HeaderData + " \r\n\r\n " ;
164
161
webClient->parseHeaderFields (headers.c_str (), (int )headers.size ());
162
+ if (dwStatusCode != 200 )
163
+ {
164
+ webClient->parseErrorResultCode ((int )dwStatusCode);
165
+ return NULL ;
166
+ }
165
167
TCByte* result = NULL ;
166
168
length = 0 ;
167
169
do
0 commit comments