289{
295 LPOLESTR accept_mimes[257];
296 const WCHAR **accept_types;
297 BYTE security_id[512];
302
303 static const WCHAR wszBindVerb[BINDVERB_CUSTOM][5] =
307
311
315
319
324 }
326 }
330 if(!
This->base.connection) {
333 }
334
336 hres = IInternetBindInfo_GetBindString(
bind_info, BINDSTRING_ROOTDOC_URL, &rootdoc_url, 1, &
num);
340 }
341
343 hres = IInternetBindInfo_GetBindString(
bind_info, BINDSTRING_ACCEPT_MIMES, accept_mimes,
num, &
num);
344 if(
hres == INET_E_USE_DEFAULT_SETTING) {
345 static const WCHAR *default_accept_mimes[] = {
L"*/*",
NULL};
346
347 accept_types = default_accept_mimes;
350 accept_types = (
const WCHAR**)accept_mimes;
351 }else {
352 WARN(
"GetBindString BINDSTRING_ACCEPT_MIMES failed: %08lx\n",
hres);
354 }
355 accept_mimes[
num] = 0;
356
359
363 This->base.bind_info.dwBindVerb < BINDVERB_CUSTOM
364 ? wszBindVerb[
This->base.bind_info.dwBindVerb] :
This->base.bind_info.szCustomVerb,
367 }
372 if (!
This->base.request) {
375 }
376
377 hres = IInternetProtocolSink_QueryInterface(
This->base.protocol_sink, &IID_IServiceProvider,
380 WARN(
"IInternetProtocolSink_QueryInterface IID_IServiceProvider failed: %08lx\n",
hres);
382 }
383
385 &IID_IHttpNegotiate, (
void **)&
This->http_negotiate);
387 WARN(
"IServiceProvider_QueryService IID_IHttpNegotiate failed: %08lx\n",
hres);
390 }
391
396 }
397
399 0, &addl_header);
402 WARN(
"IHttpNegotiate_BeginningTransaction failed: %08lx\n",
hres);
405 }
406
408
410 if(!
This->full_header) {
413 }
414
419
421 &IID_IHttpNegotiate2, (void **)&http_negotiate2);
424 WARN(
"IServiceProvider_QueryService IID_IHttpNegotiate2 failed: %08lx\n",
hres);
425
426 }else {
428 hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, security_id, &
len, 0);
429 IHttpNegotiate2_Release(http_negotiate2);
431 WARN(
"IHttpNegotiate2_GetRootSecurityId failed: %08lx\n",
hres);
432 }
433
434
435
436 if(
This->base.bind_info.dwBindVerb == BINDVERB_POST) {
438 hres = IInternetBindInfo_GetBindString(
bind_info, BINDSTRING_POST_COOKIE, &post_cookie, 1, &
num);
441 post_cookie,
lstrlenW(post_cookie)))
442 WARN(
"InternetSetOption INTERNET_OPTION_SECONDARY_CACHE_KEY failed: %ld\n",
GetLastError());
444 }
445 }
446
450 WARN(
"InternetSetOption(INTERNET_OPTION_ERROR_MASK) failed: %lu\n",
GetLastError());
451
455 WARN(
"InternetSetOption(INTERNET_OPTION_HTTP_DECODING) failed: %lu\n",
GetLastError());
456
457 do {
459
464
465
466
467
469 default:
471 }
473
474 WARN(
"HttpSendRequest failed: %ld\n",
error);
476}
void user(int argc, const char *argv[])
void WINAPI CoTaskMemFree(void *ptr)
static const WCHAR default_headersW[]
HRESULT protocol_syncbinding(Protocol *protocol)
static HINTERNET internet_session
HINTERNET WINAPI HttpOpenRequestW(HINTERNET hHttpSession, LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion, LPCWSTR lpszReferrer, LPCWSTR *lpszAcceptTypes, DWORD dwFlags, DWORD_PTR dwContext)
HINTERNET WINAPI InternetConnectW(HINTERNET hInternet, LPCWSTR lpszServerName, INTERNET_PORT nServerPort, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwService, DWORD dwFlags, DWORD_PTR dwContext)
BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, LPVOID lpBuffer, DWORD dwBufferLength)
GLboolean GLboolean GLboolean b
#define memcpy(s1, s2, n)
static IServiceProvider service_provider
static IInternetBindInfo bind_info
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define INET_E_NO_VALID_MEDIA
#define INET_E_RESOURCE_NOT_FOUND
#define INET_E_CANNOT_CONNECT
#define INTERNET_ERROR_MASK_COMBINED_SEC_CERT
#define INTERNET_OPTION_SECONDARY_CACHE_KEY
#define INTERNET_FLAG_SECURE
#define INTERNET_OPTION_ERROR_MASK
#define INTERNET_OPTION_HTTP_DECODING
#define INTERNET_SERVICE_HTTP