mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
115 lines
3.4 KiB
Diff
115 lines
3.4 KiB
Diff
|
From b6db59b7d1a7ca08a2cb3c0fb52145fa89cd2e17 Mon Sep 17 00:00:00 2001
|
||
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||
|
Date: Thu, 5 Jan 2023 14:36:31 +1100
|
||
|
Subject: [PATCH 2/4] msxml3: Implement IXMLHTTPRequest3 SetProperty
|
||
|
|
||
|
---
|
||
|
dlls/msxml3/httprequest.c | 77 ++++++++++++++++++++++++++++++++++++++-
|
||
|
1 file changed, 75 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c
|
||
|
index 98dd23c9fbb..d8360680411 100644
|
||
|
--- a/dlls/msxml3/httprequest.c
|
||
|
+++ b/dlls/msxml3/httprequest.c
|
||
|
@@ -102,6 +102,21 @@ typedef struct
|
||
|
|
||
|
/* IObjectSafety */
|
||
|
DWORD safeopt;
|
||
|
+
|
||
|
+ /* Properties */
|
||
|
+ DWORD no_prompt;
|
||
|
+ DWORD no_auth;
|
||
|
+ DWORD timeout;
|
||
|
+ BOOL no_headeres;
|
||
|
+ BOOL redirect;
|
||
|
+ BOOL cache;
|
||
|
+ BOOL extended;
|
||
|
+ BOOL query_utf8;
|
||
|
+ BOOL ignore_errors;
|
||
|
+ BOOL threshold;
|
||
|
+ DWORD enterrprised_id;
|
||
|
+ DWORD max_connections;
|
||
|
+
|
||
|
} httprequest;
|
||
|
|
||
|
typedef struct
|
||
|
@@ -2230,8 +2245,52 @@ static HRESULT WINAPI xml_http_request_2_SetCustomResponseStream(IXMLHTTPRequest
|
||
|
static HRESULT WINAPI xml_http_request_2_SetProperty(IXMLHTTPRequest3 *iface, XHR_PROPERTY property, ULONGLONG value)
|
||
|
{
|
||
|
struct xml_http_request_2 *This = impl_from_IXMLHTTPRequest3(iface);
|
||
|
- FIXME("(%p)->(%#x %s) stub!\n", This, property, wine_dbgstr_longlong( value ));
|
||
|
- return E_NOTIMPL;
|
||
|
+
|
||
|
+ TRACE("(%p)->(%#x %s) stub!\n", This, property, wine_dbgstr_longlong( value ));
|
||
|
+
|
||
|
+ switch (property)
|
||
|
+ {
|
||
|
+ case XHR_PROP_NO_CRED_PROMPT:
|
||
|
+ This->req.no_prompt = value;
|
||
|
+ break;
|
||
|
+ case XHR_PROP_NO_AUTH:
|
||
|
+ This->req.no_auth = value;
|
||
|
+ break;
|
||
|
+ case XHR_PROP_TIMEOUT:
|
||
|
+ This->req.timeout = value;
|
||
|
+ break;
|
||
|
+ case XHR_PROP_NO_DEFAULT_HEADERS:
|
||
|
+ This->req.no_headeres = value != 0;
|
||
|
+ break;
|
||
|
+ case XHR_PROP_REPORT_REDIRECT_STATUS:
|
||
|
+ This->req.redirect = value != 0;
|
||
|
+ break;
|
||
|
+ case XHR_PROP_NO_CACHE:
|
||
|
+ This->req.cache = value != 0;
|
||
|
+ break;
|
||
|
+ case XHR_PROP_EXTENDED_ERROR:
|
||
|
+ This->req.extended = value != 0;
|
||
|
+ break;
|
||
|
+ case XHR_PROP_QUERY_STRING_UTF8:
|
||
|
+ This->req.query_utf8 = value != 0;
|
||
|
+ break;
|
||
|
+ case XHR_PROP_IGNORE_CERT_ERRORS:
|
||
|
+ This->req.ignore_errors = value != 0;
|
||
|
+ break;
|
||
|
+ case XHR_PROP_ONDATA_THRESHOLD:
|
||
|
+ This->req.threshold = value;
|
||
|
+ break;
|
||
|
+ case XHR_PROP_SET_ENTERPRISEID:
|
||
|
+ This->req.enterrprised_id = value;
|
||
|
+ break;
|
||
|
+ case XHR_PROP_MAX_CONNECTIONS:
|
||
|
+ This->req.max_connections = value;
|
||
|
+ break;
|
||
|
+ default:
|
||
|
+ WARN("Invalid property %#x\n", property);
|
||
|
+ return E_INVALIDARG;
|
||
|
+ }
|
||
|
+ return S_OK;
|
||
|
}
|
||
|
|
||
|
static HRESULT WINAPI xml_http_request_2_SetRequestHeader(IXMLHTTPRequest3 *iface,
|
||
|
@@ -2551,6 +2610,20 @@ static void init_httprequest(httprequest *req)
|
||
|
|
||
|
req->site = NULL;
|
||
|
req->safeopt = 0;
|
||
|
+
|
||
|
+ /* Properties */
|
||
|
+ req->no_prompt = XHR_CRED_PROMPT_ALL;
|
||
|
+ req->no_auth = XHR_AUTH_ALL;
|
||
|
+ req->timeout = 0xFFFFFFFF;
|
||
|
+ req->no_headeres = FALSE;
|
||
|
+ req->redirect = FALSE;
|
||
|
+ req->cache = FALSE;
|
||
|
+ req->extended = FALSE;
|
||
|
+ req->query_utf8 = FALSE;;
|
||
|
+ req->ignore_errors = FALSE;;
|
||
|
+ req->threshold = 0x100;
|
||
|
+ req->enterrprised_id = 0;
|
||
|
+ req->max_connections = 10;
|
||
|
}
|
||
|
|
||
|
HRESULT XMLHTTPRequest_create(void **obj)
|
||
|
--
|
||
|
2.39.0
|
||
|
|