ReactOS 0.4.16-dev-2208-g6350669
httprequest.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "wininet.h"
#include "winreg.h"
#include "winuser.h"
#include "ole2.h"
#include "mshtml.h"
#include "msxml6.h"
#include "objsafe.h"
#include "docobj.h"
#include "shlwapi.h"
#include "msxml_dispex.h"
#include "wine/debug.h"
Include dependency graph for httprequest.c:

Go to the source code of this file.

Classes

struct  httpheader
 
struct  httprequest
 
struct  serverhttp
 
struct  BindStatusCallback
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct BindStatusCallback BindStatusCallback
 

Enumerations

enum  response_encoding {
  RESPONSE_ENCODING_NONE , RESPONSE_ENCODING_UCS4BE , RESPONSE_ENCODING_UCS4LE , RESPONSE_ENCODING_UCS4_2143 ,
  RESPONSE_ENCODING_UCS4_3412 , RESPONSE_ENCODING_EBCDIC , RESPONSE_ENCODING_UTF8 , RESPONSE_ENCODING_UTF16LE ,
  RESPONSE_ENCODING_UTF16BE
}
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msxml)
 
static httprequestimpl_from_IXMLHTTPRequest (IXMLHTTPRequest *iface)
 
static httprequestimpl_from_IObjectWithSite (IObjectWithSite *iface)
 
static httprequestimpl_from_IObjectSafety (IObjectSafety *iface)
 
static httprequestimpl_from_ISupportErrorInfo (ISupportErrorInfo *iface)
 
static serverhttpimpl_from_IServerXMLHTTPRequest (IServerXMLHTTPRequest *iface)
 
static void httprequest_setreadystate (httprequest *This, READYSTATE state)
 
static void free_response_headers (httprequest *This)
 
static void free_request_headers (httprequest *This)
 
static BindStatusCallbackimpl_from_IBindStatusCallback (IBindStatusCallback *iface)
 
static BindStatusCallbackimpl_from_IHttpNegotiate (IHttpNegotiate *iface)
 
static BindStatusCallbackimpl_from_IAuthenticate (IAuthenticate *iface)
 
static void BindStatusCallback_Detach (BindStatusCallback *bsc)
 
static HRESULT WINAPI BindStatusCallback_QueryInterface (IBindStatusCallback *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI BindStatusCallback_AddRef (IBindStatusCallback *iface)
 
static ULONG WINAPI BindStatusCallback_Release (IBindStatusCallback *iface)
 
static HRESULT WINAPI BindStatusCallback_OnStartBinding (IBindStatusCallback *iface, DWORD reserved, IBinding *pbind)
 
static HRESULT WINAPI BindStatusCallback_GetPriority (IBindStatusCallback *iface, LONG *pPriority)
 
static HRESULT WINAPI BindStatusCallback_OnLowResource (IBindStatusCallback *iface, DWORD reserved)
 
static HRESULT WINAPI BindStatusCallback_OnProgress (IBindStatusCallback *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
 
static HRESULT WINAPI BindStatusCallback_OnStopBinding (IBindStatusCallback *iface, HRESULT hr, LPCWSTR error)
 
static HRESULT WINAPI BindStatusCallback_GetBindInfo (IBindStatusCallback *iface, DWORD *bind_flags, BINDINFO *pbindinfo)
 
static HRESULT WINAPI BindStatusCallback_OnDataAvailable (IBindStatusCallback *iface, DWORD flags, DWORD size, FORMATETC *format, STGMEDIUM *stgmed)
 
static HRESULT WINAPI BindStatusCallback_OnObjectAvailable (IBindStatusCallback *iface, REFIID riid, IUnknown *punk)
 
static HRESULT WINAPI BSCHttpNegotiate_QueryInterface (IHttpNegotiate *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI BSCHttpNegotiate_AddRef (IHttpNegotiate *iface)
 
static ULONG WINAPI BSCHttpNegotiate_Release (IHttpNegotiate *iface)
 
static HRESULT WINAPI BSCHttpNegotiate_BeginningTransaction (IHttpNegotiate *iface, LPCWSTR url, LPCWSTR headers, DWORD reserved, LPWSTR *add_headers)
 
static void add_response_header (httprequest *This, const WCHAR *data, int len)
 
static HRESULT WINAPI BSCHttpNegotiate_OnResponse (IHttpNegotiate *iface, DWORD code, LPCWSTR resp_headers, LPCWSTR req_headers, LPWSTR *add_reqheaders)
 
static HRESULT WINAPI Authenticate_QueryInterface (IAuthenticate *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI Authenticate_AddRef (IAuthenticate *iface)
 
static ULONG WINAPI Authenticate_Release (IAuthenticate *iface)
 
static HRESULT WINAPI Authenticate_Authenticate (IAuthenticate *iface, HWND *hwnd, LPWSTR *username, LPWSTR *password)
 
static HRESULT BindStatusCallback_create (httprequest *This, BindStatusCallback **obj, const VARIANT *body)
 
static HRESULT verify_uri (httprequest *This, IUri *uri)
 
static HRESULT httprequest_open (httprequest *This, BSTR method, BSTR url, VARIANT async, VARIANT user, VARIANT password)
 
static HRESULT httprequest_setRequestHeader (httprequest *This, BSTR header, BSTR value)
 
static HRESULT httprequest_getResponseHeader (httprequest *This, BSTR header, BSTR *value)
 
static HRESULT httprequest_getAllResponseHeaders (httprequest *This, BSTR *respheaders)
 
static HRESULT httprequest_send (httprequest *This, VARIANT body)
 
static HRESULT httprequest_abort (httprequest *This)
 
static HRESULT httprequest_get_status (httprequest *This, LONG *status)
 
static HRESULT httprequest_get_statusText (httprequest *This, BSTR *status)
 
static unsigned int detect_response_encoding (const BYTE *in, unsigned int len)
 
static HRESULT httprequest_get_responseText (httprequest *This, BSTR *body)
 
static HRESULT httprequest_get_responseXML (httprequest *This, IDispatch **body)
 
static HRESULT httprequest_get_responseBody (httprequest *This, VARIANT *body)
 
static HRESULT httprequest_get_responseStream (httprequest *This, VARIANT *body)
 
static HRESULT httprequest_get_readyState (httprequest *This, LONG *state)
 
static HRESULT httprequest_put_onreadystatechange (httprequest *This, IDispatch *sink)
 
static void httprequest_release (httprequest *This)
 
static HRESULT WINAPI XMLHTTPRequest_QueryInterface (IXMLHTTPRequest *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI XMLHTTPRequest_AddRef (IXMLHTTPRequest *iface)
 
static ULONG WINAPI XMLHTTPRequest_Release (IXMLHTTPRequest *iface)
 
static HRESULT WINAPI XMLHTTPRequest_GetTypeInfoCount (IXMLHTTPRequest *iface, UINT *pctinfo)
 
static HRESULT WINAPI XMLHTTPRequest_GetTypeInfo (IXMLHTTPRequest *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI XMLHTTPRequest_GetIDsOfNames (IXMLHTTPRequest *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI XMLHTTPRequest_Invoke (IXMLHTTPRequest *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI XMLHTTPRequest_open (IXMLHTTPRequest *iface, BSTR method, BSTR url, VARIANT async, VARIANT user, VARIANT password)
 
static HRESULT WINAPI XMLHTTPRequest_setRequestHeader (IXMLHTTPRequest *iface, BSTR header, BSTR value)
 
static HRESULT WINAPI XMLHTTPRequest_getResponseHeader (IXMLHTTPRequest *iface, BSTR header, BSTR *value)
 
static HRESULT WINAPI XMLHTTPRequest_getAllResponseHeaders (IXMLHTTPRequest *iface, BSTR *respheaders)
 
static HRESULT WINAPI XMLHTTPRequest_send (IXMLHTTPRequest *iface, VARIANT body)
 
static HRESULT WINAPI XMLHTTPRequest_abort (IXMLHTTPRequest *iface)
 
static HRESULT WINAPI XMLHTTPRequest_get_status (IXMLHTTPRequest *iface, LONG *status)
 
static HRESULT WINAPI XMLHTTPRequest_get_statusText (IXMLHTTPRequest *iface, BSTR *status)
 
static HRESULT WINAPI XMLHTTPRequest_get_responseXML (IXMLHTTPRequest *iface, IDispatch **body)
 
static HRESULT WINAPI XMLHTTPRequest_get_responseText (IXMLHTTPRequest *iface, BSTR *body)
 
static HRESULT WINAPI XMLHTTPRequest_get_responseBody (IXMLHTTPRequest *iface, VARIANT *body)
 
static HRESULT WINAPI XMLHTTPRequest_get_responseStream (IXMLHTTPRequest *iface, VARIANT *body)
 
static HRESULT WINAPI XMLHTTPRequest_get_readyState (IXMLHTTPRequest *iface, LONG *state)
 
static HRESULT WINAPI XMLHTTPRequest_put_onreadystatechange (IXMLHTTPRequest *iface, IDispatch *sink)
 
static HRESULT WINAPI httprequest_ObjectWithSite_QueryInterface (IObjectWithSite *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI httprequest_ObjectWithSite_AddRef (IObjectWithSite *iface)
 
static ULONG WINAPI httprequest_ObjectWithSite_Release (IObjectWithSite *iface)
 
static HRESULT WINAPI httprequest_ObjectWithSite_GetSite (IObjectWithSite *iface, REFIID iid, void **ppvSite)
 
IUriget_base_uri (IUnknown *site)
 
static HRESULT WINAPI httprequest_ObjectWithSite_SetSite (IObjectWithSite *iface, IUnknown *punk)
 
static HRESULT WINAPI httprequest_Safety_QueryInterface (IObjectSafety *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI httprequest_Safety_AddRef (IObjectSafety *iface)
 
static ULONG WINAPI httprequest_Safety_Release (IObjectSafety *iface)
 
static HRESULT WINAPI httprequest_Safety_GetInterfaceSafetyOptions (IObjectSafety *iface, REFIID riid, DWORD *supported, DWORD *enabled)
 
static HRESULT WINAPI httprequest_Safety_SetInterfaceSafetyOptions (IObjectSafety *iface, REFIID riid, DWORD mask, DWORD enabled)
 
static HRESULT WINAPI SupportErrorInfo_QueryInterface (ISupportErrorInfo *iface, REFIID riid, void **obj)
 
static ULONG WINAPI SupportErrorInfo_AddRef (ISupportErrorInfo *iface)
 
static ULONG WINAPI SupportErrorInfo_Release (ISupportErrorInfo *iface)
 
static HRESULT WINAPI SupportErrorInfo_InterfaceSupportsErrorInfo (ISupportErrorInfo *iface, REFIID riid)
 
static HRESULT WINAPI ServerXMLHTTPRequest_QueryInterface (IServerXMLHTTPRequest *iface, REFIID riid, void **obj)
 
static ULONG WINAPI ServerXMLHTTPRequest_AddRef (IServerXMLHTTPRequest *iface)
 
static ULONG WINAPI ServerXMLHTTPRequest_Release (IServerXMLHTTPRequest *iface)
 
static HRESULT WINAPI ServerXMLHTTPRequest_GetTypeInfoCount (IServerXMLHTTPRequest *iface, UINT *pctinfo)
 
static HRESULT WINAPI ServerXMLHTTPRequest_GetTypeInfo (IServerXMLHTTPRequest *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI ServerXMLHTTPRequest_GetIDsOfNames (IServerXMLHTTPRequest *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI ServerXMLHTTPRequest_Invoke (IServerXMLHTTPRequest *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI ServerXMLHTTPRequest_open (IServerXMLHTTPRequest *iface, BSTR method, BSTR url, VARIANT async, VARIANT user, VARIANT password)
 
static HRESULT WINAPI ServerXMLHTTPRequest_setRequestHeader (IServerXMLHTTPRequest *iface, BSTR header, BSTR value)
 
static HRESULT WINAPI ServerXMLHTTPRequest_getResponseHeader (IServerXMLHTTPRequest *iface, BSTR header, BSTR *value)
 
static HRESULT WINAPI ServerXMLHTTPRequest_getAllResponseHeaders (IServerXMLHTTPRequest *iface, BSTR *respheaders)
 
static HRESULT WINAPI ServerXMLHTTPRequest_send (IServerXMLHTTPRequest *iface, VARIANT body)
 
static HRESULT WINAPI ServerXMLHTTPRequest_abort (IServerXMLHTTPRequest *iface)
 
static HRESULT WINAPI ServerXMLHTTPRequest_get_status (IServerXMLHTTPRequest *iface, LONG *status)
 
static HRESULT WINAPI ServerXMLHTTPRequest_get_statusText (IServerXMLHTTPRequest *iface, BSTR *status)
 
static HRESULT WINAPI ServerXMLHTTPRequest_get_responseXML (IServerXMLHTTPRequest *iface, IDispatch **body)
 
static HRESULT WINAPI ServerXMLHTTPRequest_get_responseText (IServerXMLHTTPRequest *iface, BSTR *body)
 
static HRESULT WINAPI ServerXMLHTTPRequest_get_responseBody (IServerXMLHTTPRequest *iface, VARIANT *body)
 
static HRESULT WINAPI ServerXMLHTTPRequest_get_responseStream (IServerXMLHTTPRequest *iface, VARIANT *body)
 
static HRESULT WINAPI ServerXMLHTTPRequest_get_readyState (IServerXMLHTTPRequest *iface, LONG *state)
 
static HRESULT WINAPI ServerXMLHTTPRequest_put_onreadystatechange (IServerXMLHTTPRequest *iface, IDispatch *sink)
 
static HRESULT WINAPI ServerXMLHTTPRequest_setTimeouts (IServerXMLHTTPRequest *iface, LONG resolveTimeout, LONG connectTimeout, LONG sendTimeout, LONG receiveTimeout)
 
static HRESULT WINAPI ServerXMLHTTPRequest_waitForResponse (IServerXMLHTTPRequest *iface, VARIANT timeout, VARIANT_BOOL *isSuccessful)
 
static HRESULT WINAPI ServerXMLHTTPRequest_getOption (IServerXMLHTTPRequest *iface, SERVERXMLHTTP_OPTION option, VARIANT *value)
 
static HRESULT WINAPI ServerXMLHTTPRequest_setOption (IServerXMLHTTPRequest *iface, SERVERXMLHTTP_OPTION option, VARIANT value)
 
static void init_httprequest (httprequest *req)
 
HRESULT XMLHTTPRequest_create (void **obj)
 
HRESULT ServerXMLHTTP_create (void **obj)
 

Variables

static const WCHAR colspaceW [] = {':',' ',0}
 
static const WCHAR crlfW [] = {'\r','\n',0}
 
static const DWORD safety_supported_options
 
static const IBindStatusCallbackVtbl BindStatusCallbackVtbl
 
static const IHttpNegotiateVtbl BSCHttpNegotiateVtbl
 
static const IAuthenticateVtbl AuthenticateVtbl
 
static const struct IXMLHTTPRequestVtbl XMLHTTPRequestVtbl
 
static const IObjectWithSiteVtbl ObjectWithSiteVtbl
 
static const IObjectSafetyVtbl ObjectSafetyVtbl
 
static const ISupportErrorInfoVtbl SupportErrorInfoVtbl
 
static const struct IServerXMLHTTPRequestVtbl ServerXMLHTTPRequestVtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file httprequest.c.

Typedef Documentation

◆ BindStatusCallback

Definition at line 52 of file httprequest.c.

Enumeration Type Documentation

◆ response_encoding

Enumerator
RESPONSE_ENCODING_NONE 
RESPONSE_ENCODING_UCS4BE 
RESPONSE_ENCODING_UCS4LE 
RESPONSE_ENCODING_UCS4_2143 
RESPONSE_ENCODING_UCS4_3412 
RESPONSE_ENCODING_EBCDIC 
RESPONSE_ENCODING_UTF8 
RESPONSE_ENCODING_UTF16LE 
RESPONSE_ENCODING_UTF16BE 

Definition at line 1113 of file httprequest.c.

1114{
1124};
@ RESPONSE_ENCODING_UCS4_3412
Definition: httprequest.c:1119
@ RESPONSE_ENCODING_UTF8
Definition: httprequest.c:1121
@ RESPONSE_ENCODING_UCS4_2143
Definition: httprequest.c:1118
@ RESPONSE_ENCODING_UTF16LE
Definition: httprequest.c:1122
@ RESPONSE_ENCODING_UCS4LE
Definition: httprequest.c:1117
@ RESPONSE_ENCODING_UTF16BE
Definition: httprequest.c:1123
@ RESPONSE_ENCODING_UCS4BE
Definition: httprequest.c:1116
@ RESPONSE_ENCODING_NONE
Definition: httprequest.c:1115
@ RESPONSE_ENCODING_EBCDIC
Definition: httprequest.c:1120

Function Documentation

◆ add_response_header()

static void add_response_header ( httprequest This,
const WCHAR data,
int  len 
)
static

Definition at line 538 of file httprequest.c.

539{
540 struct httpheader *entry;
541 const WCHAR *ptr = data;
543
544 while (*ptr)
545 {
546 if (*ptr == ':')
547 {
549 /* skip leading spaces for a value */
550 while (*++ptr == ' ')
551 ;
553 break;
554 }
555 ptr++;
556 }
557
558 if (!*ptr) return;
559
560 /* new header */
561 TRACE("got header %s:%s\n", debugstr_w(header), debugstr_w(value));
562
563 entry = malloc(sizeof(*entry));
564 entry->header = header;
565 entry->value = value;
566 list_add_head(&This->respheaders, &entry->entry);
567}
static void list_add_head(struct list_entry *head, struct list_entry *entry)
Definition: list.h:76
#define malloc
Definition: debug_ros.c:4
OLECHAR * BSTR
Definition: compat.h:2293
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum GLsizei len
Definition: glext.h:6722
uint32_t entry
Definition: isohybrid.c:63
#define debugstr_w
Definition: kernel32.h:32
static PVOID ptr
Definition: dispmode.c:27
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
#define TRACE(s)
Definition: solgame.cpp:4
BSTR header
Definition: httprequest.c:57
BSTR value
Definition: httprequest.c:58
Definition: pdh_main.c:96
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by httprequest_getResponseHeader().

◆ Authenticate_AddRef()

static ULONG WINAPI Authenticate_AddRef ( IAuthenticate iface)
static

Definition at line 634 of file httprequest.c.

635{
637 return IBindStatusCallback_AddRef(&This->IBindStatusCallback_iface);
638}
static BindStatusCallback * impl_from_IAuthenticate(IAuthenticate *iface)
Definition: httprequest.c:214

◆ Authenticate_Authenticate()

static HRESULT WINAPI Authenticate_Authenticate ( IAuthenticate iface,
HWND hwnd,
LPWSTR username,
LPWSTR password 
)
static

Definition at line 646 of file httprequest.c.

648{
650 httprequest *request = This->request;
651
652 TRACE("(%p)->(%p %p %p)\n", This, hwnd, username, password);
653
654 if (request->user && *request->user)
655 {
656 if (hwnd) *hwnd = NULL;
659 if (!*username || !*password)
660 {
663 return E_OUTOFMEMORY;
664 }
665
666 memcpy(*username, request->user, SysStringByteLen(request->user)+sizeof(WCHAR));
668 }
669
670 return S_OK;
671}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
#define S_OK
Definition: intsafe.h:52
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static WCHAR password[]
Definition: url.c:33
static WCHAR username[]
Definition: url.c:32
UINT WINAPI SysStringByteLen(BSTR str)
Definition: oleaut.c:215
Definition: tftpd.h:86
WCHAR * password
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

◆ Authenticate_QueryInterface()

static HRESULT WINAPI Authenticate_QueryInterface ( IAuthenticate iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 627 of file httprequest.c.

629{
631 return IBindStatusCallback_QueryInterface(&This->IBindStatusCallback_iface, riid, ppv);
632}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ Authenticate_Release()

static ULONG WINAPI Authenticate_Release ( IAuthenticate iface)
static

Definition at line 640 of file httprequest.c.

641{
643 return IBindStatusCallback_Release(&This->IBindStatusCallback_iface);
644}

◆ BindStatusCallback_AddRef()

static ULONG WINAPI BindStatusCallback_AddRef ( IBindStatusCallback iface)
static

Definition at line 271 of file httprequest.c.

272{
275
276 TRACE("%p, refcount %ld.\n", iface, ref);
277
278 return ref;
279}
#define InterlockedIncrement
Definition: armddk.h:53
static BindStatusCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
Definition: httprequest.c:204
long LONG
Definition: pedump.c:60
Definition: send.c:48

◆ BindStatusCallback_create()

static HRESULT BindStatusCallback_create ( httprequest This,
BindStatusCallback **  obj,
const VARIANT body 
)
static

Definition at line 680 of file httprequest.c.

681{
683 IBindCtx *pbc = NULL;
684 HRESULT hr;
685 LONG size;
686
687 if (!(bsc = malloc(sizeof(*bsc))))
688 return E_OUTOFMEMORY;
689
691 bsc->IHttpNegotiate_iface.lpVtbl = &BSCHttpNegotiateVtbl;
692 bsc->IAuthenticate_iface.lpVtbl = &AuthenticateVtbl;
693 bsc->ref = 1;
694 bsc->request = This;
695 bsc->binding = NULL;
696 bsc->stream = NULL;
697 bsc->body = NULL;
698
699 TRACE("(%p)->(%p)\n", This, bsc);
700
701 This->use_utf8_content = FALSE;
702
703 if (This->verb != BINDVERB_GET)
704 {
705 void *send_data, *ptr;
706 SAFEARRAY *sa = NULL;
707
708 if (V_VT(body) == (VT_VARIANT|VT_BYREF))
710
711 switch (V_VT(body))
712 {
713 case VT_BSTR:
714 {
715 int len = SysStringLen(V_BSTR(body));
716 const WCHAR *str = V_BSTR(body);
717 UINT i, cp = CP_ACP;
718
719 for (i = 0; i < len; i++)
720 {
721 if (str[i] > 127)
722 {
723 cp = CP_UTF8;
724 break;
725 }
726 }
727
729 if (!(ptr = malloc(size)))
730 {
731 free(bsc);
732 return E_OUTOFMEMORY;
733 }
735 if (cp == CP_UTF8) This->use_utf8_content = TRUE;
736 break;
737 }
738 case VT_ARRAY|VT_UI1:
739 {
740 sa = V_ARRAY(body);
741 if ((hr = SafeArrayAccessData(sa, &ptr)) != S_OK)
742 {
743 free(bsc);
744 return hr;
745 }
746 if ((hr = SafeArrayGetUBound(sa, 1, &size)) != S_OK)
747 {
749 free(bsc);
750 return hr;
751 }
752 size++;
753 break;
754 }
755 default:
756 FIXME("unsupported body data type %d\n", V_VT(body));
757 /* fall through */
758 case VT_EMPTY:
759 case VT_ERROR:
760 case VT_NULL:
761 ptr = NULL;
762 size = 0;
763 break;
764 }
765
766 if (size)
767 {
768 bsc->body = GlobalAlloc(GMEM_FIXED, size);
769 if (!bsc->body)
770 {
771 if (V_VT(body) == VT_BSTR)
772 free(ptr);
773 else if (V_VT(body) == (VT_ARRAY|VT_UI1))
775
776 free(bsc);
777 return E_OUTOFMEMORY;
778 }
779
780 send_data = GlobalLock(bsc->body);
781 memcpy(send_data, ptr, size);
782 GlobalUnlock(bsc->body);
783 }
784
785 if (V_VT(body) == VT_BSTR)
786 free(ptr);
787 else if (V_VT(body) == (VT_ARRAY|VT_UI1))
789 }
790
791 hr = CreateBindCtx(0, &pbc);
792 if (hr == S_OK)
794 if (hr == S_OK)
795 {
797
798 hr = CreateURLMonikerEx2(NULL, This->uri, &moniker, URL_MK_UNIFORM);
799 if (hr == S_OK)
800 {
802
803 hr = IMoniker_BindToStorage(moniker, pbc, NULL, &IID_IStream, (void**)&stream);
804 IMoniker_Release(moniker);
805 if (stream) IStream_Release(stream);
806 }
807 }
808
809 if (pbc)
810 IBindCtx_Release(pbc);
811
812 if (FAILED(hr))
813 {
814 IBindStatusCallback_Release(&bsc->IBindStatusCallback_iface);
815 bsc = NULL;
816 }
817
818 *obj = bsc;
819 return hr;
820}
static struct sockaddr_in sa
Definition: adnsresfilter.c:69
#define FIXME(fmt,...)
Definition: precomp.h:53
#define free
Definition: debug_ros.c:5
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
@ VT_BSTR
Definition: compat.h:2303
@ VT_NULL
Definition: compat.h:2296
@ VT_BYREF
Definition: compat.h:2342
@ VT_ERROR
Definition: compat.h:2305
@ VT_ARRAY
Definition: compat.h:2341
@ VT_VARIANT
Definition: compat.h:2307
@ VT_EMPTY
Definition: compat.h:2295
@ VT_UI1
Definition: compat.h:2311
HRESULT WINAPI SafeArrayGetUBound(SAFEARRAY *psa, UINT nDim, LONG *plUbound)
Definition: safearray.c:1033
HRESULT WINAPI SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
Definition: safearray.c:1137
HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY *psa)
Definition: safearray.c:1168
GLsizeiptr size
Definition: glext.h:5919
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
static const IBindStatusCallbackVtbl BindStatusCallbackVtbl
Definition: httprequest.c:426
static const IHttpNegotiateVtbl BSCHttpNegotiateVtbl
Definition: httprequest.c:619
static const IAuthenticateVtbl AuthenticateVtbl
Definition: httprequest.c:673
#define FAILED(hr)
Definition: intsafe.h:51
static ERESOURCE GlobalLock
Definition: sys_arch.c:8
POINT cp
Definition: magnifier.c:59
unsigned int UINT
Definition: ndis.h:50
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC *ppbc)
Definition: bindctx.c:556
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:196
#define V_ARRAY(A)
Definition: oleauto.h:222
#define V_VARIANTREF(A)
Definition: oleauto.h:283
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
const WCHAR * str
#define CP_UTF8
Definition: nls.h:20
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
HRESULT hr
Definition: shlfolder.c:183
Definition: xmldoc.c:231
IBindStatusCallback IBindStatusCallback_iface
Definition: xmldoc.c:232
Definition: main.c:40
Definition: parse.h:23
HRESULT WINAPI CreateURLMonikerEx2(IMoniker *pmkContext, IUri *pUri, IMoniker **ppmk, DWORD dwFlags)
Definition: umon.c:668
HRESULT WINAPI RegisterBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pbsc, IBindStatusCallback **ppbscPrevious, DWORD dwReserved)
Definition: bindctx.c:615
#define GMEM_FIXED
Definition: winbase.h:317

Referenced by httprequest_send().

◆ BindStatusCallback_Detach()

static void BindStatusCallback_Detach ( BindStatusCallback bsc)
static

Definition at line 219 of file httprequest.c.

220{
221 if (bsc)
222 {
223 if (bsc->binding) IBinding_Abort(bsc->binding);
224 bsc->request->bsc = NULL;
225 bsc->request = NULL;
226 IBindStatusCallback_Release(&bsc->IBindStatusCallback_iface);
227 }
228}

Referenced by BindStatusCallback_OnStopBinding(), httprequest_abort(), httprequest_release(), and httprequest_send().

◆ BindStatusCallback_GetBindInfo()

static HRESULT WINAPI BindStatusCallback_GetBindInfo ( IBindStatusCallback iface,
DWORD bind_flags,
BINDINFO *  pbindinfo 
)
static

Definition at line 364 of file httprequest.c.

366{
368
369 TRACE("(%p)->(%p %p)\n", This, bind_flags, pbindinfo);
370
371 *bind_flags = 0;
372 if (This->request->async) *bind_flags |= BINDF_ASYNCHRONOUS;
373
374 if (This->request->verb != BINDVERB_GET && This->body)
375 {
376 pbindinfo->stgmedData.tymed = TYMED_HGLOBAL;
377 pbindinfo->stgmedData.hGlobal = This->body;
378 pbindinfo->cbstgmedData = GlobalSize(This->body);
379 /* callback owns passed body pointer */
380 IBindStatusCallback_QueryInterface(iface, &IID_IUnknown, (void**)&pbindinfo->stgmedData.pUnkForRelease);
381 }
382
383 pbindinfo->dwBindVerb = This->request->verb;
384 if (This->request->verb == BINDVERB_CUSTOM)
385 {
386 pbindinfo->szCustomVerb = CoTaskMemAlloc(SysStringByteLen(This->request->custom)+sizeof(WCHAR));
387 lstrcpyW(pbindinfo->szCustomVerb, This->request->custom);
388 }
389
390 return S_OK;
391}
const GUID IID_IUnknown
#define lstrcpyW
Definition: compat.h:749
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
Definition: heapmem.c:1090

◆ BindStatusCallback_GetPriority()

static HRESULT WINAPI BindStatusCallback_GetPriority ( IBindStatusCallback iface,
LONG pPriority 
)
static

Definition at line 316 of file httprequest.c.

317{
319
320 TRACE("(%p)->(%p)\n", This, pPriority);
321
322 return E_NOTIMPL;
323}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BindStatusCallback_OnDataAvailable()

static HRESULT WINAPI BindStatusCallback_OnDataAvailable ( IBindStatusCallback iface,
DWORD  flags,
DWORD  size,
FORMATETC *  format,
STGMEDIUM *  stgmed 
)
static

Definition at line 393 of file httprequest.c.

395{
397 DWORD read, written;
398 BYTE buf[4096];
399 HRESULT hr;
400
401 TRACE("%p, %#lx, %lu, %p, %p.\n", iface, flags, size, format, stgmed);
402
403 do
404 {
405 hr = IStream_Read(stgmed->pstm, buf, sizeof(buf), &read);
406 if (hr != S_OK) break;
407
408 hr = IStream_Write(This->stream, buf, read, &written);
409 } while((hr == S_OK) && written != 0 && read != 0);
410
411 httprequest_setreadystate(This->request, READYSTATE_INTERACTIVE);
412
413 return S_OK;
414}
#define read
Definition: acwin.h:96
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLbitfield flags
Definition: glext.h:7161
static void httprequest_setreadystate(httprequest *This, READYSTATE state)
Definition: httprequest.c:135
Definition: format.c:58
unsigned char BYTE
Definition: xxhash.c:193

◆ BindStatusCallback_OnLowResource()

static HRESULT WINAPI BindStatusCallback_OnLowResource ( IBindStatusCallback iface,
DWORD  reserved 
)
static

Definition at line 325 of file httprequest.c.

326{
327 TRACE("%p, %ld.\n", iface, reserved);
328
329 return E_NOTIMPL;
330}
r reserved
Definition: btrfs.c:3006

◆ BindStatusCallback_OnObjectAvailable()

static HRESULT WINAPI BindStatusCallback_OnObjectAvailable ( IBindStatusCallback iface,
REFIID  riid,
IUnknown punk 
)
static

Definition at line 416 of file httprequest.c.

418{
420
421 FIXME("(%p)->(%s %p): stub\n", This, debugstr_guid(riid), punk);
422
423 return E_NOTIMPL;
424}
#define debugstr_guid
Definition: kernel32.h:35
_In_opt_ IUnknown * punk
Definition: shlwapi.h:158

◆ BindStatusCallback_OnProgress()

static HRESULT WINAPI BindStatusCallback_OnProgress ( IBindStatusCallback iface,
ULONG  ulProgress,
ULONG  ulProgressMax,
ULONG  ulStatusCode,
LPCWSTR  szStatusText 
)
static

Definition at line 332 of file httprequest.c.

334{
335 TRACE("%p, %lu, %lu, %lu, %s.\n", iface, ulProgress, ulProgressMax, ulStatusCode,
336 debugstr_w(szStatusText));
337
338 return S_OK;
339}

◆ BindStatusCallback_OnStartBinding()

static HRESULT WINAPI BindStatusCallback_OnStartBinding ( IBindStatusCallback iface,
DWORD  reserved,
IBinding pbind 
)
static

Definition at line 299 of file httprequest.c.

301{
303
304 TRACE("%p, %ld, %p.\n", iface, reserved, pbind);
305
306 if (!pbind) return E_INVALIDARG;
307
308 This->binding = pbind;
309 IBinding_AddRef(pbind);
310
311 httprequest_setreadystate(This->request, READYSTATE_LOADED);
312
313 return CreateStreamOnHGlobal(NULL, TRUE, &This->stream);
314}
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)

◆ BindStatusCallback_OnStopBinding()

static HRESULT WINAPI BindStatusCallback_OnStopBinding ( IBindStatusCallback iface,
HRESULT  hr,
LPCWSTR  error 
)
static

Definition at line 341 of file httprequest.c.

343{
345
346 TRACE("%p, %#lx, %s.\n", iface, hr, debugstr_w(error));
347
348 if (This->binding)
349 {
350 IBinding_Release(This->binding);
351 This->binding = NULL;
352 }
353
354 if (hr == S_OK)
355 {
356 BindStatusCallback_Detach(This->request->bsc);
357 This->request->bsc = This;
358 httprequest_setreadystate(This->request, READYSTATE_COMPLETE);
359 }
360
361 return S_OK;
362}
static void BindStatusCallback_Detach(BindStatusCallback *bsc)
Definition: httprequest.c:219
#define error(str)
Definition: mkdosfs.c:1605

◆ BindStatusCallback_QueryInterface()

static HRESULT WINAPI BindStatusCallback_QueryInterface ( IBindStatusCallback iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 230 of file httprequest.c.

232{
234
235 *ppv = NULL;
236
237 TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv);
238
240 IsEqualGUID(&IID_IBindStatusCallback, riid))
241 {
242 *ppv = &This->IBindStatusCallback_iface;
243 }
244 else if (IsEqualGUID(&IID_IHttpNegotiate, riid))
245 {
246 *ppv = &This->IHttpNegotiate_iface;
247 }
248 else if (IsEqualGUID(&IID_IAuthenticate, riid))
249 {
250 *ppv = &This->IAuthenticate_iface;
251 }
252 else if (IsEqualGUID(&IID_IServiceProvider, riid) ||
253 IsEqualGUID(&IID_IBindStatusCallbackEx, riid) ||
254 IsEqualGUID(&IID_IInternetProtocol, riid) ||
255 IsEqualGUID(&IID_IHttpNegotiate2, riid))
256 {
257 return E_NOINTERFACE;
258 }
259
260 if (*ppv)
261 {
262 IBindStatusCallback_AddRef(iface);
263 return S_OK;
264 }
265
266 FIXME("Unsupported riid = %s\n", debugstr_guid(riid));
267
268 return E_NOINTERFACE;
269}
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ BindStatusCallback_Release()

static ULONG WINAPI BindStatusCallback_Release ( IBindStatusCallback iface)
static

Definition at line 281 of file httprequest.c.

282{
285
286 TRACE("%p, refcount %ld.\n", iface, ref);
287
288 if (!ref)
289 {
290 if (This->binding) IBinding_Release(This->binding);
291 if (This->stream) IStream_Release(This->stream);
292 if (This->body) GlobalFree(This->body);
293 free(This);
294 }
295
296 return ref;
297}
#define InterlockedDecrement
Definition: armddk.h:52
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611

◆ BSCHttpNegotiate_AddRef()

static ULONG WINAPI BSCHttpNegotiate_AddRef ( IHttpNegotiate iface)
static

Definition at line 447 of file httprequest.c.

448{
450 return IBindStatusCallback_AddRef(&This->IBindStatusCallback_iface);
451}
static BindStatusCallback * impl_from_IHttpNegotiate(IHttpNegotiate *iface)
Definition: httprequest.c:209

◆ BSCHttpNegotiate_BeginningTransaction()

static HRESULT WINAPI BSCHttpNegotiate_BeginningTransaction ( IHttpNegotiate iface,
LPCWSTR  url,
LPCWSTR  headers,
DWORD  reserved,
LPWSTR add_headers 
)
static

Definition at line 459 of file httprequest.c.

461{
462 static const WCHAR content_type_utf8W[] = {'C','o','n','t','e','n','t','-','T','y','p','e',':',' ',
463 't','e','x','t','/','p','l','a','i','n',';','c','h','a','r','s','e','t','=','u','t','f','-','8','\r','\n',0};
464 static const WCHAR refererW[] = {'R','e','f','e','r','e','r',':',' ',0};
465
467 const struct httpheader *entry;
468 BSTR base_uri = NULL;
469 WCHAR *buff, *ptr;
470 int size = 0;
471
472 TRACE("%p, %s, %s, %ld, %p.\n", iface, debugstr_w(url), debugstr_w(headers), reserved, add_headers);
473
474 *add_headers = NULL;
475
476 if (This->request->use_utf8_content)
477 size = sizeof(content_type_utf8W);
478
479 if (!list_empty(&This->request->reqheaders))
480 size += This->request->reqheader_size*sizeof(WCHAR);
481
482 if (This->request->base_uri)
483 {
484 IUri_GetRawUri(This->request->base_uri, &base_uri);
485 size += SysStringLen(base_uri)*sizeof(WCHAR) + sizeof(refererW) + sizeof(crlfW);
486 }
487
488 if (!size)
489 {
490 SysFreeString(base_uri);
491 return S_OK;
492 }
493
495 if (!buff)
496 {
497 SysFreeString(base_uri);
498 return E_OUTOFMEMORY;
499 }
500
501 ptr = buff;
502 if (This->request->use_utf8_content)
503 {
504 lstrcpyW(ptr, content_type_utf8W);
505 ptr += ARRAY_SIZE(content_type_utf8W) - 1;
506 }
507
508 if (base_uri)
509 {
510 lstrcpyW(ptr, refererW);
511 lstrcatW(ptr, base_uri);
513 ptr += lstrlenW(refererW) + SysStringLen(base_uri) + lstrlenW(crlfW);
514 SysFreeString(base_uri);
515 }
516
517 /* user headers */
518 LIST_FOR_EACH_ENTRY(entry, &This->request->reqheaders, struct httpheader, entry)
519 {
520 lstrcpyW(ptr, entry->header);
521 ptr += SysStringLen(entry->header);
522
524 ptr += ARRAY_SIZE(colspaceW) - 1;
525
526 lstrcpyW(ptr, entry->value);
527 ptr += SysStringLen(entry->value);
528
530 ptr += ARRAY_SIZE(crlfW) - 1;
531 }
532
533 *add_headers = buff;
534
535 return S_OK;
536}
#define ARRAY_SIZE(A)
Definition: main.h:20
static int list_empty(struct list_entry *head)
Definition: list.h:58
#define lstrlenW
Definition: compat.h:750
static unsigned char buff[32768]
Definition: fatten.c:17
static const WCHAR colspaceW[]
Definition: httprequest.c:45
static const WCHAR crlfW[]
Definition: httprequest.c:46
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
static const WCHAR url[]
Definition: encode.c:1384
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
vector< Header * > headers
Definition: sdkparse.cpp:39

◆ BSCHttpNegotiate_OnResponse()

static HRESULT WINAPI BSCHttpNegotiate_OnResponse ( IHttpNegotiate iface,
DWORD  code,
LPCWSTR  resp_headers,
LPCWSTR  req_headers,
LPWSTR add_reqheaders 
)
static

Definition at line 569 of file httprequest.c.

571{
573
574 TRACE("%p, %ld, %s, %s, %p.\n", iface, code, debugstr_w(resp_headers),
575 debugstr_w(req_headers), add_reqheaders);
576
577 This->request->status = code;
578 /* store headers and status text */
579 free_response_headers(This->request);
580 SysFreeString(This->request->status_text);
581 This->request->status_text = NULL;
582 if (resp_headers)
583 {
584 const WCHAR *ptr, *line, *status_text;
585
586 ptr = line = resp_headers;
587
588 /* skip HTTP-Version */
589 ptr = wcschr(ptr, ' ');
590 if (ptr)
591 {
592 /* skip Status-Code */
593 ptr = wcschr(++ptr, ' ');
594 if (ptr)
595 {
596 status_text = ++ptr;
597 /* now it supposed to end with CRLF */
598 while (*ptr)
599 {
600 if (*ptr == '\r' && *(ptr+1) == '\n')
601 {
602 line = ptr + 2;
603 This->request->status_text = SysAllocStringLen(status_text, ptr-status_text);
604 TRACE("status text %s\n", debugstr_w(This->request->status_text));
605 break;
606 }
607 ptr++;
608 }
609 }
610 }
611
612 /* store as unparsed string for now */
613 This->request->raw_respheaders = SysAllocString(line);
614 }
615
616 return S_OK;
617}
#define wcschr
Definition: compat.h:17
static void free_response_headers(httprequest *This)
Definition: httprequest.c:158
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
Definition: inflate.c:139
Definition: parser.c:49

◆ BSCHttpNegotiate_QueryInterface()

static HRESULT WINAPI BSCHttpNegotiate_QueryInterface ( IHttpNegotiate iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 440 of file httprequest.c.

442{
444 return IBindStatusCallback_QueryInterface(&This->IBindStatusCallback_iface, riid, ppv);
445}

◆ BSCHttpNegotiate_Release()

static ULONG WINAPI BSCHttpNegotiate_Release ( IHttpNegotiate iface)
static

Definition at line 453 of file httprequest.c.

454{
456 return IBindStatusCallback_Release(&This->IBindStatusCallback_iface);
457}

◆ detect_response_encoding()

static unsigned int detect_response_encoding ( const BYTE in,
unsigned int  len 
)
static

Definition at line 1126 of file httprequest.c.

1127{
1128 if (len >= 4)
1129 {
1130 if (in[0] == 0 && in[1] == 0 && in[2] == 0 && in[3] == 0x3c)
1132 if (in[0] == 0x3c && in[1] == 0 && in[2] == 0 && in[3] == 0)
1134 if (in[0] == 0 && in[1] == 0 && in[2] == 0x3c && in[3] == 0)
1136 if (in[0] == 0 && in[1] == 0x3c && in[2] == 0 && in[3] == 0)
1138 if (in[0] == 0x4c && in[1] == 0x6f && in[2] == 0xa7 && in[3] == 0x94)
1140 if (in[0] == 0x3c && in[1] == 0x3f && in[2] == 0x78 && in[3] == 0x6d)
1142 if (in[0] == 0x3c && in[1] == 0 && in[2] == 0x3f && in[3] == 0)
1144 if (in[0] == 0 && in[1] == 0x3c && in[2] == 0 && in[3] == 0x3f)
1146 }
1147
1148 if (len >= 3)
1149 {
1150 if (in[0] == 0xef && in[1] == 0xbb && in[2] == 0xbf)
1152 }
1153
1154 if (len >= 2)
1155 {
1156 if (in[0] == 0xfe && in[1] == 0xff)
1158 if (in[0] == 0xff && in[1] == 0xfe)
1160 }
1161
1163}
GLuint in
Definition: glext.h:9616

Referenced by httprequest_get_responseText().

◆ free_request_headers()

static void free_request_headers ( httprequest This)
static

Definition at line 174 of file httprequest.c.

175{
176 struct httpheader *header, *header2;
177
178 LIST_FOR_EACH_ENTRY_SAFE(header, header2, &This->reqheaders, struct httpheader, entry)
179 {
180 list_remove(&header->entry);
181 SysFreeString(header->header);
183 free(header);
184 }
185}
static void list_remove(struct list_entry *entry)
Definition: list.h:90
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
WCHAR * value

Referenced by httprequest_open(), and httprequest_release().

◆ free_response_headers()

static void free_response_headers ( httprequest This)
static

Definition at line 158 of file httprequest.c.

159{
160 struct httpheader *header, *header2;
161
162 LIST_FOR_EACH_ENTRY_SAFE(header, header2, &This->respheaders, struct httpheader, entry)
163 {
164 list_remove(&header->entry);
165 SysFreeString(header->header);
167 free(header);
168 }
169
170 SysFreeString(This->raw_respheaders);
171 This->raw_respheaders = NULL;
172}

Referenced by BSCHttpNegotiate_OnResponse(), and httprequest_release().

◆ get_base_uri()

IUri * get_base_uri ( IUnknown site)

Definition at line 1629 of file httprequest.c.

1630{
1631 IServiceProvider *provider;
1632 IHTMLDocument2 *doc;
1633 IUri *uri;
1634 BSTR url;
1635 HRESULT hr;
1636
1637 hr = IUnknown_QueryInterface(site, &IID_IServiceProvider, (void**)&provider);
1638 if(FAILED(hr))
1639 return NULL;
1640
1641 hr = IServiceProvider_QueryService(provider, &SID_SContainerDispatch, &IID_IHTMLDocument2, (void**)&doc);
1642 if(FAILED(hr))
1643 hr = IServiceProvider_QueryService(provider, &SID_SInternetHostSecurityManager, &IID_IHTMLDocument2, (void**)&doc);
1644 IServiceProvider_Release(provider);
1645 if(FAILED(hr))
1646 return NULL;
1647
1648 hr = IHTMLDocument2_get_URL(doc, &url);
1649 IHTMLDocument2_Release(doc);
1650 if(FAILED(hr) || !url || !*url)
1651 return NULL;
1652
1653 TRACE("host url %s\n", debugstr_w(url));
1654
1655 hr = CreateUri(url, 0, 0, &uri);
1657 if(FAILED(hr))
1658 return NULL;
1659
1660 return uri;
1661}
HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
Definition: uri.c:5700
static IActiveScriptSite * site
Definition: script.c:149
const char * uri
Definition: sec_mgr.c:1588

Referenced by domdoc_ObjectWithSite_SetSite(), and httprequest_ObjectWithSite_SetSite().

◆ httprequest_abort()

static HRESULT httprequest_abort ( httprequest This)
static

Definition at line 1085 of file httprequest.c.

1086{
1088
1089 httprequest_setreadystate(This, READYSTATE_UNINITIALIZED);
1090
1091 return S_OK;
1092}

Referenced by ServerXMLHTTPRequest_abort(), and XMLHTTPRequest_abort().

◆ httprequest_get_readyState()

static HRESULT httprequest_get_readyState ( httprequest This,
LONG state 
)
static

Definition at line 1314 of file httprequest.c.

1315{
1316 if (!state) return E_POINTER;
1317
1318 *state = This->state;
1319 return S_OK;
1320}
static int state
Definition: maze.c:121
#define E_POINTER
Definition: winerror.h:3480

Referenced by ServerXMLHTTPRequest_get_readyState(), and XMLHTTPRequest_get_readyState().

◆ httprequest_get_responseBody()

static HRESULT httprequest_get_responseBody ( httprequest This,
VARIANT body 
)
static

Definition at line 1242 of file httprequest.c.

1243{
1244 HGLOBAL hglobal;
1245 HRESULT hr;
1246
1247 if (!body) return E_INVALIDARG;
1248 V_VT(body) = VT_EMPTY;
1249
1250 if (This->state != READYSTATE_COMPLETE) return E_PENDING;
1251
1252 hr = GetHGlobalFromStream(This->bsc->stream, &hglobal);
1253 if (hr == S_OK)
1254 {
1255 void *ptr = GlobalLock(hglobal);
1256 DWORD size = GlobalSize(hglobal);
1257
1258 SAFEARRAYBOUND bound;
1260
1261 bound.lLbound = 0;
1262 bound.cElements = size;
1263 array = SafeArrayCreate(VT_UI1, 1, &bound);
1264
1265 if (array)
1266 {
1267 void *dest;
1268
1269 V_VT(body) = VT_ARRAY | VT_UI1;
1270 V_ARRAY(body) = array;
1271
1273 if (hr == S_OK)
1274 {
1275 memcpy(dest, ptr, size);
1277 }
1278 else
1279 {
1281 }
1282 }
1283 else
1284 hr = E_FAIL;
1285
1286 GlobalUnlock(hglobal);
1287 }
1288
1289 return hr;
1290}
#define E_FAIL
Definition: ddrawi.h:102
#define E_PENDING
Definition: dinput.h:172
HRESULT WINAPI GetHGlobalFromStream(IStream *pstm, HGLOBAL *phglobal)
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
Definition: safearray.c:600
static char * dest
Definition: rtl.c:135
Definition: undname.c:54
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648

Referenced by ServerXMLHTTPRequest_get_responseBody(), and XMLHTTPRequest_get_responseBody().

◆ httprequest_get_responseStream()

static HRESULT httprequest_get_responseStream ( httprequest This,
VARIANT body 
)
static

Definition at line 1292 of file httprequest.c.

1293{
1294 LARGE_INTEGER move;
1295 IStream *stream;
1296 HRESULT hr;
1297
1298 if (!body) return E_INVALIDARG;
1299 V_VT(body) = VT_EMPTY;
1300
1301 if (This->state != READYSTATE_COMPLETE) return E_PENDING;
1302
1303 hr = IStream_Clone(This->bsc->stream, &stream);
1304
1305 move.QuadPart = 0;
1306 IStream_Seek(stream, move, STREAM_SEEK_SET, NULL);
1307
1308 V_VT(body) = VT_UNKNOWN;
1310
1311 return hr;
1312}
@ VT_UNKNOWN
Definition: compat.h:2308
#define V_UNKNOWN(A)
Definition: oleauto.h:281
LONGLONG QuadPart
Definition: typedefs.h:114

Referenced by ServerXMLHTTPRequest_get_responseStream(), and XMLHTTPRequest_get_responseStream().

◆ httprequest_get_responseText()

static HRESULT httprequest_get_responseText ( httprequest This,
BSTR body 
)
static

Definition at line 1165 of file httprequest.c.

1166{
1167 HGLOBAL hglobal;
1168 HRESULT hr;
1169
1170 if (!body) return E_POINTER;
1171 if (This->state != READYSTATE_COMPLETE) return E_FAIL;
1172
1173 hr = GetHGlobalFromStream(This->bsc->stream, &hglobal);
1174 if (hr == S_OK)
1175 {
1176 const char *ptr = GlobalLock(hglobal);
1177 DWORD size = GlobalSize(hglobal);
1178 unsigned int encoding = RESPONSE_ENCODING_NONE;
1179
1180 /* try to determine data encoding */
1181 if (size >= 4)
1182 {
1183 encoding = detect_response_encoding((const BYTE *)ptr, 4);
1184 TRACE("detected encoding: %u.\n", encoding);
1185
1186 if (encoding != RESPONSE_ENCODING_UTF8 &&
1187 encoding != RESPONSE_ENCODING_UTF16LE &&
1188 encoding != RESPONSE_ENCODING_NONE )
1189 {
1190 FIXME("unsupported response encoding: %u.\n", encoding);
1191 GlobalUnlock(hglobal);
1192 return E_FAIL;
1193 }
1194 }
1195
1196 /* without BOM assume UTF-8 */
1197 if (encoding == RESPONSE_ENCODING_UTF8 || encoding == RESPONSE_ENCODING_NONE)
1198 {
1200
1202 if (*body)
1204 }
1205 else
1207
1208 if (!*body) hr = E_OUTOFMEMORY;
1209 GlobalUnlock(hglobal);
1210 }
1211
1212 return hr;
1213}
#define MultiByteToWideChar
Definition: compat.h:110
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
static unsigned int detect_response_encoding(const BYTE *in, unsigned int len)
Definition: httprequest.c:1126
BSTR WINAPI DECLSPEC_HOTPATCH SysAllocStringByteLen(LPCSTR str, UINT len)
Definition: oleaut.c:428
const char * LPCSTR
Definition: xmlstorage.h:183

Referenced by httprequest_get_responseXML(), ServerXMLHTTPRequest_get_responseText(), and XMLHTTPRequest_get_responseText().

◆ httprequest_get_responseXML()

static HRESULT httprequest_get_responseXML ( httprequest This,
IDispatch **  body 
)
static

Definition at line 1215 of file httprequest.c.

1216{
1217 IXMLDOMDocument3 *doc;
1218 HRESULT hr;
1219 BSTR str;
1220
1221 if (!body) return E_INVALIDARG;
1222 if (This->state != READYSTATE_COMPLETE) return E_FAIL;
1223
1224 hr = dom_document_create(MSXML_DEFAULT, (void**)&doc);
1225 if (hr != S_OK) return hr;
1226
1228 if (hr == S_OK)
1229 {
1231
1232 hr = IXMLDOMDocument3_loadXML(doc, str, &ok);
1234 }
1235
1236 IXMLDOMDocument3_QueryInterface(doc, &IID_IDispatch, (void**)body);
1237 IXMLDOMDocument3_Release(doc);
1238
1239 return hr;
1240}
#define ok(value,...)
Definition: atltest.h:57
short VARIANT_BOOL
Definition: compat.h:2290
HRESULT dom_document_create(MSXML_VERSION version, void **ppObj)
Definition: domdoc.c:3788
static HRESULT httprequest_get_responseText(httprequest *This, BSTR *body)
Definition: httprequest.c:1165
@ MSXML_DEFAULT
Definition: msxml_dispex.h:28
const GUID IID_IDispatch

Referenced by ServerXMLHTTPRequest_get_responseXML(), and XMLHTTPRequest_get_responseXML().

◆ httprequest_get_status()

static HRESULT httprequest_get_status ( httprequest This,
LONG status 
)
static

Definition at line 1094 of file httprequest.c.

1095{
1096 if (!status) return E_POINTER;
1097
1098 *status = This->status;
1099
1100 return This->state == READYSTATE_COMPLETE ? S_OK : E_FAIL;
1101}
Definition: ps.c:97

Referenced by ServerXMLHTTPRequest_get_status(), and XMLHTTPRequest_get_status().

◆ httprequest_get_statusText()

static HRESULT httprequest_get_statusText ( httprequest This,
BSTR status 
)
static

Definition at line 1103 of file httprequest.c.

1104{
1105 if (!status) return E_POINTER;
1106 if (This->state != READYSTATE_COMPLETE) return E_FAIL;
1107
1108 *status = SysAllocString(This->status_text);
1109
1110 return S_OK;
1111}

Referenced by ServerXMLHTTPRequest_get_statusText(), and XMLHTTPRequest_get_statusText().

◆ httprequest_getAllResponseHeaders()

static HRESULT httprequest_getAllResponseHeaders ( httprequest This,
BSTR respheaders 
)
static

Definition at line 1061 of file httprequest.c.

1062{
1063 if (!respheaders) return E_POINTER;
1064
1065 *respheaders = SysAllocString(This->raw_respheaders);
1066
1067 return S_OK;
1068}

Referenced by ServerXMLHTTPRequest_getAllResponseHeaders(), and XMLHTTPRequest_getAllResponseHeaders().

◆ httprequest_getResponseHeader()

static HRESULT httprequest_getResponseHeader ( httprequest This,
BSTR  header,
BSTR value 
)
static

Definition at line 1024 of file httprequest.c.

1025{
1026 struct httpheader *entry;
1027
1028 if (!header) return E_INVALIDARG;
1029 if (!value) return E_POINTER;
1030
1031 if (This->raw_respheaders && list_empty(&This->respheaders))
1032 {
1033 WCHAR *ptr, *line;
1034
1035 ptr = line = This->raw_respheaders;
1036 while (*ptr)
1037 {
1038 if (*ptr == '\r' && *(ptr+1) == '\n')
1039 {
1041 ptr++; line = ++ptr;
1042 continue;
1043 }
1044 ptr++;
1045 }
1046 }
1047
1048 LIST_FOR_EACH_ENTRY(entry, &This->respheaders, struct httpheader, entry)
1049 {
1050 if (!wcsicmp(entry->header, header))
1051 {
1052 *value = SysAllocString(entry->value);
1053 TRACE("header value %s\n", debugstr_w(*value));
1054 return S_OK;
1055 }
1056 }
1057
1058 return S_FALSE;
1059}
#define wcsicmp
Definition: compat.h:15
static void add_response_header(httprequest *This, const WCHAR *data, int len)
Definition: httprequest.c:538
#define S_FALSE
Definition: winerror.h:3451

Referenced by ServerXMLHTTPRequest_getResponseHeader(), and XMLHTTPRequest_getResponseHeader().

◆ httprequest_ObjectWithSite_AddRef()

static ULONG WINAPI httprequest_ObjectWithSite_AddRef ( IObjectWithSite iface)
static

Definition at line 1605 of file httprequest.c.

1606{
1608 return IXMLHTTPRequest_AddRef(&This->IXMLHTTPRequest_iface);
1609}
static httprequest * impl_from_IObjectWithSite(IObjectWithSite *iface)
Definition: httprequest.c:115

◆ httprequest_ObjectWithSite_GetSite()

static HRESULT WINAPI httprequest_ObjectWithSite_GetSite ( IObjectWithSite iface,
REFIID  iid,
void **  ppvSite 
)
static

Definition at line 1617 of file httprequest.c.

1618{
1620
1621 TRACE("(%p)->(%s %p)\n", This, debugstr_guid( iid ), ppvSite );
1622
1623 if ( !This->site )
1624 return E_FAIL;
1625
1626 return IUnknown_QueryInterface( This->site, iid, ppvSite );
1627}

◆ httprequest_ObjectWithSite_QueryInterface()

static HRESULT WINAPI httprequest_ObjectWithSite_QueryInterface ( IObjectWithSite iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1599 of file httprequest.c.

1600{
1602 return IXMLHTTPRequest_QueryInterface(&This->IXMLHTTPRequest_iface, riid, ppvObject);
1603}

◆ httprequest_ObjectWithSite_Release()

static ULONG WINAPI httprequest_ObjectWithSite_Release ( IObjectWithSite iface)
static

Definition at line 1611 of file httprequest.c.

1612{
1614 return IXMLHTTPRequest_Release(&This->IXMLHTTPRequest_iface);
1615}

◆ httprequest_ObjectWithSite_SetSite()

static HRESULT WINAPI httprequest_ObjectWithSite_SetSite ( IObjectWithSite iface,
IUnknown punk 
)
static

Definition at line 1663 of file httprequest.c.

1664{
1666
1667 TRACE("(%p)->(%p)\n", This, punk);
1668
1669 if(This->site)
1670 IUnknown_Release( This->site );
1671 if(This->base_uri)
1672 IUri_Release(This->base_uri);
1673
1674 This->site = punk;
1675
1676 if (punk)
1677 {
1678 IUnknown_AddRef( punk );
1679 This->base_uri = get_base_uri(This->site);
1680 }
1681
1682 return S_OK;
1683}
IUri * get_base_uri(IUnknown *site)
Definition: httprequest.c:1629

◆ httprequest_open()

static HRESULT httprequest_open ( httprequest This,
BSTR  method,
BSTR  url,
VARIANT  async,
VARIANT  user,
VARIANT  password 
)
static

Definition at line 869 of file httprequest.c.

871{
872 static const WCHAR MethodHeadW[] = {'H','E','A','D',0};
873 static const WCHAR MethodGetW[] = {'G','E','T',0};
874 static const WCHAR MethodPutW[] = {'P','U','T',0};
875 static const WCHAR MethodPostW[] = {'P','O','S','T',0};
876 static const WCHAR MethodDeleteW[] = {'D','E','L','E','T','E',0};
877 static const WCHAR MethodPropFindW[] = {'P','R','O','P','F','I','N','D',0};
878 VARIANT str, is_async;
879 IUri *uri;
880 HRESULT hr;
881
882 if (!method || !url) return E_INVALIDARG;
883
884 /* free previously set data */
885 if(This->uri) {
886 IUri_Release(This->uri);
887 This->uri = NULL;
888 }
889
890 SysFreeString(This->user);
891 SysFreeString(This->password);
892 This->user = This->password = NULL;
894
895 if (!wcsicmp(method, MethodGetW))
896 {
897 This->verb = BINDVERB_GET;
898 }
899 else if (!wcsicmp(method, MethodPutW))
900 {
901 This->verb = BINDVERB_PUT;
902 }
903 else if (!wcsicmp(method, MethodPostW))
904 {
905 This->verb = BINDVERB_POST;
906 }
907 else if (!wcsicmp(method, MethodDeleteW) ||
908 !wcsicmp(method, MethodHeadW) ||
909 !wcsicmp(method, MethodPropFindW))
910 {
911 This->verb = BINDVERB_CUSTOM;
912 SysReAllocString(&This->custom, method);
913 }
914 else
915 {
916 FIXME("unsupported request type %s\n", debugstr_w(method));
917 This->verb = -1;
918 return E_FAIL;
919 }
920
921 if(This->base_uri)
922 hr = CoInternetCombineUrlEx(This->base_uri, url, 0, &uri, 0);
923 else
924 hr = CreateUri(url, 0, 0, &uri);
925 if(FAILED(hr)) {
926 WARN("Could not create IUri object, hr %#lx.\n", hr);
927 return hr;
928 }
929
930 hr = verify_uri(This, uri);
931 if(FAILED(hr)) {
932 IUri_Release(uri);
933 return hr;
934 }
935
938 if (hr == S_OK)
939 This->user = V_BSTR(&str);
940
943 if (hr == S_OK)
944 This->password = V_BSTR(&str);
945
946 /* add authentication info */
947 if (This->user && *This->user)
948 {
949 IUriBuilder *builder;
950
951 hr = CreateIUriBuilder(uri, 0, 0, &builder);
952 if (hr == S_OK)
953 {
954 IUri *full_uri;
955
956 IUriBuilder_SetUserName(builder, This->user);
957 IUriBuilder_SetPassword(builder, This->password);
958 hr = IUriBuilder_CreateUri(builder, -1, 0, 0, &full_uri);
959 if (hr == S_OK)
960 {
961 IUri_Release(uri);
962 uri = full_uri;
963 }
964 else
965 WARN("failed to create modified uri, hr %#lx.\n", hr);
966 IUriBuilder_Release(builder);
967 }
968 else
969 WARN("IUriBuilder creation failed, hr %#lx.\n", hr);
970 }
971
972 This->uri = uri;
973
974 VariantInit(&is_async);
975 hr = VariantChangeType(&is_async, &async, 0, VT_BOOL);
976 This->async = hr == S_OK && V_BOOL(&is_async);
977
978 httprequest_setreadystate(This, READYSTATE_LOADING);
979
980 return S_OK;
981}
void user(int argc, const char *argv[])
Definition: cmds.c:1350
#define WARN(fmt,...)
Definition: precomp.h:61
@ VT_BOOL
Definition: compat.h:2306
HRESULT WINAPI CoInternetCombineUrlEx(IUri *pBaseUri, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, IUri **ppCombinedUri, DWORD_PTR dwReserved)
Definition: uri.c:6762
HRESULT WINAPI CreateIUriBuilder(IUri *pIUri, DWORD dwFlags, DWORD_PTR dwReserved, IUriBuilder **ppIUriBuilder)
Definition: uri.c:6353
method
Definition: dragdrop.c:54
static void free_request_headers(httprequest *This)
Definition: httprequest.c:174
static HRESULT verify_uri(httprequest *This, IUri *uri)
Definition: httprequest.c:822
INT WINAPI SysReAllocString(LPBSTR old, LPCOLESTR str)
Definition: oleaut.c:467
#define V_BOOL(A)
Definition: oleauto.h:224
HRESULT WINAPI DECLSPEC_HOTPATCH VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, USHORT wFlags, VARTYPE vt)
Definition: variant.c:962
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568

Referenced by ServerXMLHTTPRequest_open(), and XMLHTTPRequest_open().

◆ httprequest_put_onreadystatechange()

static HRESULT httprequest_put_onreadystatechange ( httprequest This,
IDispatch sink 
)
static

Definition at line 1322 of file httprequest.c.

1323{
1324 if (This->sink) IDispatch_Release(This->sink);
1325 if ((This->sink = sink)) IDispatch_AddRef(This->sink);
1326
1327 return S_OK;
1328}
GLsizei GLenum GLboolean sink
Definition: glext.h:5672

Referenced by ServerXMLHTTPRequest_put_onreadystatechange(), and XMLHTTPRequest_put_onreadystatechange().

◆ httprequest_release()

static void httprequest_release ( httprequest This)
static

Definition at line 1330 of file httprequest.c.

1331{
1332 if (This->site)
1333 IUnknown_Release( This->site );
1334 if (This->uri)
1335 IUri_Release(This->uri);
1336 if (This->base_uri)
1337 IUri_Release(This->base_uri);
1338
1339 SysFreeString(This->custom);
1340 SysFreeString(This->user);
1341 SysFreeString(This->password);
1342
1343 /* cleanup headers lists */
1346 SysFreeString(This->status_text);
1347
1348 /* detach callback object */
1350
1351 if (This->sink) IDispatch_Release(This->sink);
1352}

Referenced by ServerXMLHTTPRequest_Release(), and XMLHTTPRequest_Release().

◆ httprequest_Safety_AddRef()

static ULONG WINAPI httprequest_Safety_AddRef ( IObjectSafety iface)
static

Definition at line 1701 of file httprequest.c.

1702{
1704 return IXMLHTTPRequest_AddRef(&This->IXMLHTTPRequest_iface);
1705}
static httprequest * impl_from_IObjectSafety(IObjectSafety *iface)
Definition: httprequest.c:120

◆ httprequest_Safety_GetInterfaceSafetyOptions()

static HRESULT WINAPI httprequest_Safety_GetInterfaceSafetyOptions ( IObjectSafety iface,
REFIID  riid,
DWORD supported,
DWORD enabled 
)
static

Definition at line 1713 of file httprequest.c.

1715{
1717
1718 TRACE("(%p)->(%s %p %p)\n", This, debugstr_guid(riid), supported, enabled);
1719
1720 if(!supported || !enabled) return E_POINTER;
1721
1722 *supported = safety_supported_options;
1723 *enabled = This->safeopt;
1724
1725 return S_OK;
1726}
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:7750
static const DWORD safety_supported_options
Definition: httprequest.c:47

◆ httprequest_Safety_QueryInterface()

static HRESULT WINAPI httprequest_Safety_QueryInterface ( IObjectSafety iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1695 of file httprequest.c.

1696{
1698 return IXMLHTTPRequest_QueryInterface(&This->IXMLHTTPRequest_iface, riid, ppv);
1699}

◆ httprequest_Safety_Release()

static ULONG WINAPI httprequest_Safety_Release ( IObjectSafety iface)
static

Definition at line 1707 of file httprequest.c.

1708{
1710 return IXMLHTTPRequest_Release(&This->IXMLHTTPRequest_iface);
1711}

◆ httprequest_Safety_SetInterfaceSafetyOptions()

static HRESULT WINAPI httprequest_Safety_SetInterfaceSafetyOptions ( IObjectSafety iface,
REFIID  riid,
DWORD  mask,
DWORD  enabled 
)
static

Definition at line 1728 of file httprequest.c.

1730{
1732
1733 TRACE("%p, %s, %lx, %lx.\n", iface, debugstr_guid(riid), mask, enabled);
1734
1736 return E_FAIL;
1737
1738 request->safeopt = (request->safeopt & ~mask) | (mask & enabled);
1739
1740 return S_OK;
1741}
GLenum GLint GLuint mask
Definition: glext.h:6028

◆ httprequest_send()

static HRESULT httprequest_send ( httprequest This,
VARIANT  body 
)
static

Definition at line 1070 of file httprequest.c.

1071{
1073 HRESULT hr;
1074
1075 if (This->state != READYSTATE_LOADING) return E_FAIL;
1076
1078 if (FAILED(hr))
1079 /* success path to detach it is OnStopBinding call */
1081
1082 return hr;
1083}
static HRESULT BindStatusCallback_create(httprequest *This, BindStatusCallback **obj, const VARIANT *body)
Definition: httprequest.c:680

Referenced by ServerXMLHTTPRequest_send(), and XMLHTTPRequest_send().

◆ httprequest_setreadystate()

static void httprequest_setreadystate ( httprequest This,
READYSTATE  state 
)
static

Definition at line 135 of file httprequest.c.

136{
137 READYSTATE last = This->state;
138 static const char* readystates[] = {
139 "READYSTATE_UNINITIALIZED",
140 "READYSTATE_LOADING",
141 "READYSTATE_LOADED",
142 "READYSTATE_INTERACTIVE",
143 "READYSTATE_COMPLETE"};
144
145 This->state = state;
146
147 TRACE("state %s\n", readystates[state]);
148
149 if (This->sink && last != state)
150 {
152
153 memset(&params, 0, sizeof(params));
154 IDispatch_Invoke(This->sink, 0, &IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, &params, 0, 0, 0);
155 }
156}
GLenum const GLfloat * params
Definition: glext.h:5645
static UINT UINT last
Definition: font.c:45
struct stdole::DISPPARAMS DISPPARAMS
#define LOCALE_SYSTEM_DEFAULT
#define DISPATCH_METHOD
Definition: oleauto.h:1006
#define IID_NULL
Definition: guiddef.h:98
#define memset(x, y, z)
Definition: compat.h:39

Referenced by BindStatusCallback_OnDataAvailable(), BindStatusCallback_OnStartBinding(), BindStatusCallback_OnStopBinding(), httprequest_abort(), and httprequest_open().

◆ httprequest_setRequestHeader()

static HRESULT httprequest_setRequestHeader ( httprequest This,
BSTR  header,
BSTR  value 
)
static

Definition at line 983 of file httprequest.c.

984{
985 struct httpheader *entry;
986
987 if (!header || !*header) return E_INVALIDARG;
988 if (This->state != READYSTATE_LOADING) return E_FAIL;
989 if (!value) return E_INVALIDARG;
990
991 /* replace existing header value if already added */
992 LIST_FOR_EACH_ENTRY(entry, &This->reqheaders, struct httpheader, entry)
993 {
994 if (wcscmp(entry->header, header) == 0)
995 {
996 LONG length = SysStringLen(entry->value);
997 HRESULT hr;
998
1000
1001 if (hr == S_OK)
1002 This->reqheader_size += (SysStringLen(entry->value) - length);
1003
1004 return hr;
1005 }
1006 }
1007
1008 entry = malloc(sizeof(*entry));
1009 if (!entry) return E_OUTOFMEMORY;
1010
1011 /* new header */
1012 entry->header = SysAllocString(header);
1013 entry->value = SysAllocString(value);
1014
1015 /* header length including null terminator */
1016 This->reqheader_size += SysStringLen(entry->header) + ARRAY_SIZE(colspaceW) +
1017 SysStringLen(entry->value) + ARRAY_SIZE(crlfW) - 1;
1018
1019 list_add_head(&This->reqheaders, &entry->entry);
1020
1021 return S_OK;
1022}
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:1972

Referenced by ServerXMLHTTPRequest_setRequestHeader(), and XMLHTTPRequest_setRequestHeader().

◆ impl_from_IAuthenticate()

static BindStatusCallback * impl_from_IAuthenticate ( IAuthenticate iface)
inlinestatic

Definition at line 214 of file httprequest.c.

215{
216 return CONTAINING_RECORD(iface, BindStatusCallback, IAuthenticate_iface);
217}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by Authenticate_AddRef(), Authenticate_Authenticate(), Authenticate_QueryInterface(), and Authenticate_Release().

◆ impl_from_IBindStatusCallback()

◆ impl_from_IHttpNegotiate()

static BindStatusCallback * impl_from_IHttpNegotiate ( IHttpNegotiate iface)
inlinestatic

◆ impl_from_IObjectSafety()

static httprequest * impl_from_IObjectSafety ( IObjectSafety iface)
inlinestatic

◆ impl_from_IObjectWithSite()

static httprequest * impl_from_IObjectWithSite ( IObjectWithSite iface)
inlinestatic

◆ impl_from_IServerXMLHTTPRequest()

◆ impl_from_ISupportErrorInfo()

static httprequest * impl_from_ISupportErrorInfo ( ISupportErrorInfo iface)
inlinestatic

◆ impl_from_IXMLHTTPRequest()

◆ init_httprequest()

static void init_httprequest ( httprequest req)
static

Definition at line 2057 of file httprequest.c.

2058{
2063 req->ref = 1;
2064
2065 req->async = FALSE;
2066 req->verb = -1;
2067 req->custom = NULL;
2068 req->uri = req->base_uri = NULL;
2069 req->user = req->password = NULL;
2070
2071 req->state = READYSTATE_UNINITIALIZED;
2072 req->sink = NULL;
2073
2074 req->bsc = NULL;
2075 req->status = 0;
2076 req->status_text = NULL;
2077 req->reqheader_size = 0;
2078 req->raw_respheaders = NULL;
2079 req->use_utf8_content = FALSE;
2080
2081 list_init(&req->reqheaders);
2082 list_init(&req->respheaders);
2083
2084 req->site = NULL;
2085 req->safeopt = 0;
2086}
static void list_init(struct list_entry *head)
Definition: list.h:51
static const IObjectWithSiteVtbl ObjectWithSiteVtbl
Definition: httprequest.c:1685
static const IObjectSafetyVtbl ObjectSafetyVtbl
Definition: httprequest.c:1743
static const struct IXMLHTTPRequestVtbl XMLHTTPRequestVtbl
Definition: httprequest.c:1572
static const ISupportErrorInfoVtbl SupportErrorInfoVtbl
Definition: httprequest.c:1778
DWORD safeopt
Definition: httprequest.c:101
ISupportErrorInfo ISupportErrorInfo_iface
Definition: httprequest.c:66
BSTR password
Definition: httprequest.c:90
BSTR raw_respheaders
Definition: httprequest.c:86
IUri * base_uri
Definition: httprequest.c:76
struct list reqheaders
Definition: httprequest.c:78
IObjectWithSite IObjectWithSite_iface
Definition: httprequest.c:64
LONG reqheader_size
Definition: httprequest.c:80
BindStatusCallback * bsc
Definition: httprequest.c:93
IXMLHTTPRequest IXMLHTTPRequest_iface
Definition: httprequest.c:63
struct list respheaders
Definition: httprequest.c:85
BINDVERB verb
Definition: httprequest.c:73
IObjectSafety IObjectSafety_iface
Definition: httprequest.c:65
BOOL use_utf8_content
Definition: httprequest.c:82
IUnknown * site
Definition: httprequest.c:98
IUri * uri
Definition: httprequest.c:75
BSTR status_text
Definition: httprequest.c:95
IDispatch * sink
Definition: httprequest.c:70
READYSTATE state
Definition: httprequest.c:69

Referenced by ServerXMLHTTP_create(), and XMLHTTPRequest_create().

◆ ServerXMLHTTP_create()

HRESULT ServerXMLHTTP_create ( void **  obj)

Definition at line 2106 of file httprequest.c.

2107{
2108 serverhttp *req;
2109
2110 TRACE("(%p)\n", obj);
2111
2112 req = malloc(sizeof(*req));
2113 if( !req )
2114 return E_OUTOFMEMORY;
2115
2116 init_httprequest(&req->req);
2118
2120
2121 TRACE("returning iface %p\n", *obj);
2122
2123 return S_OK;
2124}
static void init_httprequest(httprequest *req)
Definition: httprequest.c:2057
static const struct IServerXMLHTTPRequestVtbl ServerXMLHTTPRequestVtbl
Definition: httprequest.c:2028
IServerXMLHTTPRequest IServerXMLHTTPRequest_iface
Definition: httprequest.c:107
httprequest req
Definition: httprequest.c:106

◆ ServerXMLHTTPRequest_abort()

static HRESULT WINAPI ServerXMLHTTPRequest_abort ( IServerXMLHTTPRequest iface)
static

Definition at line 1937 of file httprequest.c.

1938{
1940 TRACE("(%p)\n", This);
1941 return httprequest_abort(&This->req);
1942}
static HRESULT httprequest_abort(httprequest *This)
Definition: httprequest.c:1085
static serverhttp * impl_from_IServerXMLHTTPRequest(IServerXMLHTTPRequest *iface)
Definition: httprequest.c:130

◆ ServerXMLHTTPRequest_AddRef()

static ULONG WINAPI ServerXMLHTTPRequest_AddRef ( IServerXMLHTTPRequest iface)
static

Definition at line 1816 of file httprequest.c.

1817{
1820 TRACE("%p, refcount %lu.\n", iface, ref );
1821 return ref;
1822}
uint32_t ULONG
Definition: typedefs.h:59

◆ ServerXMLHTTPRequest_get_readyState()

static HRESULT WINAPI ServerXMLHTTPRequest_get_readyState ( IServerXMLHTTPRequest iface,
LONG state 
)
static

Definition at line 1986 of file httprequest.c.

1987{
1989 TRACE("(%p)->(%p)\n", This, state);
1990 return httprequest_get_readyState(&This->req, state);
1991}
static HRESULT httprequest_get_readyState(httprequest *This, LONG *state)
Definition: httprequest.c:1314

◆ ServerXMLHTTPRequest_get_responseBody()

static HRESULT WINAPI ServerXMLHTTPRequest_get_responseBody ( IServerXMLHTTPRequest iface,
VARIANT body 
)
static

Definition at line 1972 of file httprequest.c.

1973{
1975 TRACE("(%p)->(%p)\n", This, body);
1976 return httprequest_get_responseBody(&This->req, body);
1977}
static HRESULT httprequest_get_responseBody(httprequest *This, VARIANT *body)
Definition: httprequest.c:1242

◆ ServerXMLHTTPRequest_get_responseStream()

static HRESULT WINAPI ServerXMLHTTPRequest_get_responseStream ( IServerXMLHTTPRequest iface,
VARIANT body 
)
static

Definition at line 1979 of file httprequest.c.

1980{
1982 TRACE("(%p)->(%p)\n", This, body);
1984}
static HRESULT httprequest_get_responseStream(httprequest *This, VARIANT *body)
Definition: httprequest.c:1292

◆ ServerXMLHTTPRequest_get_responseText()

static HRESULT WINAPI ServerXMLHTTPRequest_get_responseText ( IServerXMLHTTPRequest iface,
BSTR body 
)
static

Definition at line 1965 of file httprequest.c.

1966{
1968 TRACE("(%p)->(%p)\n", This, body);
1969 return httprequest_get_responseText(&This->req, body);
1970}

◆ ServerXMLHTTPRequest_get_responseXML()

static HRESULT WINAPI ServerXMLHTTPRequest_get_responseXML ( IServerXMLHTTPRequest iface,
IDispatch **  body 
)
static

Definition at line 1958 of file httprequest.c.

1959{
1961 TRACE("(%p)->(%p)\n", This, body);
1962 return httprequest_get_responseXML(&This->req, body);
1963}
static HRESULT httprequest_get_responseXML(httprequest *This, IDispatch **body)
Definition: httprequest.c:1215

◆ ServerXMLHTTPRequest_get_status()

static HRESULT WINAPI ServerXMLHTTPRequest_get_status ( IServerXMLHTTPRequest iface,
LONG status 
)
static

Definition at line 1944 of file httprequest.c.

1945{
1947 TRACE("(%p)->(%p)\n", This, status);
1948 return httprequest_get_status(&This->req, status);
1949}
static HRESULT httprequest_get_status(httprequest *This, LONG *status)
Definition: httprequest.c:1094

◆ ServerXMLHTTPRequest_get_statusText()

static HRESULT WINAPI ServerXMLHTTPRequest_get_statusText ( IServerXMLHTTPRequest iface,
BSTR status 
)
static

Definition at line 1951 of file httprequest.c.

1952{
1954 TRACE("(%p)->(%p)\n", This, status);
1955 return httprequest_get_statusText(&This->req, status);
1956}
static HRESULT httprequest_get_statusText(httprequest *This, BSTR *status)
Definition: httprequest.c:1103

◆ ServerXMLHTTPRequest_getAllResponseHeaders()

static HRESULT WINAPI ServerXMLHTTPRequest_getAllResponseHeaders ( IServerXMLHTTPRequest iface,
BSTR respheaders 
)
static

Definition at line 1923 of file httprequest.c.

1924{
1926 TRACE("(%p)->(%p)\n", This, respheaders);
1927 return httprequest_getAllResponseHeaders(&This->req, respheaders);
1928}
static HRESULT httprequest_getAllResponseHeaders(httprequest *This, BSTR *respheaders)
Definition: httprequest.c:1061

◆ ServerXMLHTTPRequest_GetIDsOfNames()

static HRESULT WINAPI ServerXMLHTTPRequest_GetIDsOfNames ( IServerXMLHTTPRequest iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 1858 of file httprequest.c.

1860{
1862 HRESULT hr;
1863
1864 TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
1865 lcid, rgDispId);
1866
1867 if(!rgszNames || cNames == 0 || !rgDispId)
1868 return E_INVALIDARG;
1869
1871 if(SUCCEEDED(hr))
1872 {
1873 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
1874 ITypeInfo_Release(typeinfo);
1875 }
1876
1877 return hr;
1878}
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
LCID lcid
Definition: locale.c:5656
#define SUCCEEDED(hr)
Definition: intsafe.h:50
@ IServerXMLHTTPRequest_tid
Definition: msxml_dispex.h:78

◆ ServerXMLHTTPRequest_getOption()

static HRESULT WINAPI ServerXMLHTTPRequest_getOption ( IServerXMLHTTPRequest iface,
SERVERXMLHTTP_OPTION  option,
VARIANT value 
)
static

Definition at line 2014 of file httprequest.c.

2015{
2017 FIXME("(%p)->(%d %p): stub\n", This, option, value);
2018 return E_NOTIMPL;
2019}
Definition: getopt.h:109

◆ ServerXMLHTTPRequest_getResponseHeader()

static HRESULT WINAPI ServerXMLHTTPRequest_getResponseHeader ( IServerXMLHTTPRequest iface,
BSTR  header,
BSTR value 
)
static

Definition at line 1916 of file httprequest.c.

1917{
1919 TRACE("(%p)->(%s %p)\n", This, debugstr_w(header), value);
1921}
static HRESULT httprequest_getResponseHeader(httprequest *This, BSTR header, BSTR *value)
Definition: httprequest.c:1024

◆ ServerXMLHTTPRequest_GetTypeInfo()

static HRESULT WINAPI ServerXMLHTTPRequest_GetTypeInfo ( IServerXMLHTTPRequest iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 1850 of file httprequest.c.

1852{
1853 TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
1854
1855 return get_typeinfo(IServerXMLHTTPRequest_tid, ppTInfo);
1856}

◆ ServerXMLHTTPRequest_GetTypeInfoCount()

static HRESULT WINAPI ServerXMLHTTPRequest_GetTypeInfoCount ( IServerXMLHTTPRequest iface,
UINT pctinfo 
)
static

Definition at line 1840 of file httprequest.c.

1841{
1843
1844 TRACE("(%p)->(%p)\n", This, pctinfo);
1845 *pctinfo = 1;
1846
1847 return S_OK;
1848}

◆ ServerXMLHTTPRequest_Invoke()

static HRESULT WINAPI ServerXMLHTTPRequest_Invoke ( IServerXMLHTTPRequest iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 1880 of file httprequest.c.

1883{
1885 HRESULT hr;
1886
1887 TRACE("%p, %ld, %s %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
1888 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1889
1891 if(SUCCEEDED(hr))
1892 {
1893 hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1894 ITypeInfo_Release(typeinfo);
1895 }
1896
1897 return hr;
1898}
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337

◆ ServerXMLHTTPRequest_open()

static HRESULT WINAPI ServerXMLHTTPRequest_open ( IServerXMLHTTPRequest iface,
BSTR  method,
BSTR  url,
VARIANT  async,
VARIANT  user,
VARIANT  password 
)
static

Definition at line 1900 of file httprequest.c.

1902{
1904 TRACE("(%p)->(%s %s %s)\n", This, debugstr_w(method), debugstr_w(url),
1905 debugstr_variant(&async));
1906 return httprequest_open(&This->req, method, url, async, user, password);
1907}
static HRESULT httprequest_open(httprequest *This, BSTR method, BSTR url, VARIANT async, VARIANT user, VARIANT password)
Definition: httprequest.c:869
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46

◆ ServerXMLHTTPRequest_put_onreadystatechange()

static HRESULT WINAPI ServerXMLHTTPRequest_put_onreadystatechange ( IServerXMLHTTPRequest iface,
IDispatch sink 
)
static

Definition at line 1993 of file httprequest.c.

1994{
1996 TRACE("(%p)->(%p)\n", This, sink);
1998}
static HRESULT httprequest_put_onreadystatechange(httprequest *This, IDispatch *sink)
Definition: httprequest.c:1322

◆ ServerXMLHTTPRequest_QueryInterface()

static HRESULT WINAPI ServerXMLHTTPRequest_QueryInterface ( IServerXMLHTTPRequest iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 1787 of file httprequest.c.

1788{
1790
1791 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj);
1792
1793 if ( IsEqualGUID( riid, &IID_IServerXMLHTTPRequest) ||
1794 IsEqualGUID( riid, &IID_IXMLHTTPRequest) ||
1797 {
1798 *obj = iface;
1799 }
1800 else if ( IsEqualGUID( riid, &IID_ISupportErrorInfo ))
1801 {
1802 *obj = &This->req.ISupportErrorInfo_iface;
1803 }
1804 else
1805 {
1806 TRACE("Unsupported interface %s\n", debugstr_guid(riid));
1807 *obj = NULL;
1808 return E_NOINTERFACE;
1809 }
1810
1811 IUnknown_AddRef( (IUnknown *)*obj );
1812
1813 return S_OK;
1814}

◆ ServerXMLHTTPRequest_Release()

static ULONG WINAPI ServerXMLHTTPRequest_Release ( IServerXMLHTTPRequest iface)
static

Definition at line 1824 of file httprequest.c.

1825{
1828
1829 TRACE("%p, refcount %lu.\n", iface, ref );
1830
1831 if (!ref)
1832 {
1834 free(request);
1835 }
1836
1837 return ref;
1838}
static void httprequest_release(httprequest *This)
Definition: httprequest.c:1330

◆ ServerXMLHTTPRequest_send()

static HRESULT WINAPI ServerXMLHTTPRequest_send ( IServerXMLHTTPRequest iface,
VARIANT  body 
)
static

Definition at line 1930 of file httprequest.c.

1931{
1933 TRACE("(%p)->(%s)\n", This, debugstr_variant(&body));
1934 return httprequest_send(&This->req, body);
1935}
static HRESULT httprequest_send(httprequest *This, VARIANT body)
Definition: httprequest.c:1070

◆ ServerXMLHTTPRequest_setOption()

static HRESULT WINAPI ServerXMLHTTPRequest_setOption ( IServerXMLHTTPRequest iface,
SERVERXMLHTTP_OPTION  option,
VARIANT  value 
)
static

Definition at line 2021 of file httprequest.c.

2022{
2024 FIXME("(%p)->(%d %s): stub\n", This, option, debugstr_variant(&value));
2025 return E_NOTIMPL;
2026}

◆ ServerXMLHTTPRequest_setRequestHeader()

static HRESULT WINAPI ServerXMLHTTPRequest_setRequestHeader ( IServerXMLHTTPRequest iface,
BSTR  header,
BSTR  value 
)
static

Definition at line 1909 of file httprequest.c.

1910{
1912 TRACE("(%p)->(%s %s)\n", This, debugstr_w(header), debugstr_w(value));
1914}
static HRESULT httprequest_setRequestHeader(httprequest *This, BSTR header, BSTR value)
Definition: httprequest.c:983

◆ ServerXMLHTTPRequest_setTimeouts()

static HRESULT WINAPI ServerXMLHTTPRequest_setTimeouts ( IServerXMLHTTPRequest iface,
LONG  resolveTimeout,
LONG  connectTimeout,
LONG  sendTimeout,
LONG  receiveTimeout 
)
static

Definition at line 2000 of file httprequest.c.

2002{
2003 FIXME("%p, %ld, %ld, %ld, %ld: stub\n", iface, resolveTimeout, connectTimeout, sendTimeout, receiveTimeout);
2004 return S_OK;
2005}

◆ ServerXMLHTTPRequest_waitForResponse()

static HRESULT WINAPI ServerXMLHTTPRequest_waitForResponse ( IServerXMLHTTPRequest iface,
VARIANT  timeout,
VARIANT_BOOL isSuccessful 
)
static

Definition at line 2007 of file httprequest.c.

2008{
2010 FIXME("(%p)->(%s %p): stub\n", This, debugstr_variant(&timeout), isSuccessful);
2011 return E_NOTIMPL;
2012}
Definition: dhcpd.h:248

◆ SupportErrorInfo_AddRef()

static ULONG WINAPI SupportErrorInfo_AddRef ( ISupportErrorInfo iface)
static

Definition at line 1757 of file httprequest.c.

1758{
1760 return IXMLHTTPRequest_AddRef(&This->IXMLHTTPRequest_iface);
1761}
static httprequest * impl_from_ISupportErrorInfo(ISupportErrorInfo *iface)
Definition: httprequest.c:125

◆ SupportErrorInfo_InterfaceSupportsErrorInfo()

static HRESULT WINAPI SupportErrorInfo_InterfaceSupportsErrorInfo ( ISupportErrorInfo iface,
REFIID  riid 
)
static

Definition at line 1769 of file httprequest.c.

1770{
1772
1773 FIXME("(%p)->(%s)\n", This, debugstr_guid(riid));
1774
1775 return E_NOTIMPL;
1776}

◆ SupportErrorInfo_QueryInterface()

static HRESULT WINAPI SupportErrorInfo_QueryInterface ( ISupportErrorInfo iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 1751 of file httprequest.c.

1752{
1754 return IXMLHTTPRequest_QueryInterface(&This->IXMLHTTPRequest_iface, riid, obj);
1755}

◆ SupportErrorInfo_Release()

static ULONG WINAPI SupportErrorInfo_Release ( ISupportErrorInfo iface)
static

Definition at line 1763 of file httprequest.c.

1764{
1766 return IXMLHTTPRequest_Release(&This->IXMLHTTPRequest_iface);
1767}

◆ verify_uri()

static HRESULT verify_uri ( httprequest This,
IUri uri 
)
static

Definition at line 822 of file httprequest.c.

823{
824 DWORD scheme, base_scheme;
825 BSTR host, base_host;
826 HRESULT hr;
827
828 if(!(This->safeopt & INTERFACESAFE_FOR_UNTRUSTED_DATA))
829 return S_OK;
830
831 if(!This->base_uri)
832 return E_ACCESSDENIED;
833
834 hr = IUri_GetScheme(uri, &scheme);
835 if(FAILED(hr))
836 return hr;
837
838 hr = IUri_GetScheme(This->base_uri, &base_scheme);
839 if(FAILED(hr))
840 return hr;
841
842 if(scheme != base_scheme) {
843 WARN("Schemes don't match\n");
844 return E_ACCESSDENIED;
845 }
846
848 FIXME("Unknown scheme\n");
849 return E_ACCESSDENIED;
850 }
851
852 hr = IUri_GetHost(uri, &host);
853 if(FAILED(hr))
854 return hr;
855
856 hr = IUri_GetHost(This->base_uri, &base_host);
857 if(SUCCEEDED(hr)) {
858 if(wcsicmp(host, base_host)) {
859 WARN("Hosts don't match\n");
861 }
862 SysFreeString(base_host);
863 }
864
866 return hr;
867}
DWORD scheme
Definition: txthost.c:37
#define E_ACCESSDENIED
Definition: winerror.h:4116
@ INTERNET_SCHEME_UNKNOWN
Definition: wininet.h:137

Referenced by httprequest_open().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msxml  )

◆ XMLHTTPRequest_abort()

static HRESULT WINAPI XMLHTTPRequest_abort ( IXMLHTTPRequest *  iface)
static

Definition at line 1509 of file httprequest.c.

1510{
1512 TRACE("(%p)\n", This);
1513 return httprequest_abort(This);
1514}
static httprequest * impl_from_IXMLHTTPRequest(IXMLHTTPRequest *iface)
Definition: httprequest.c:110

◆ XMLHTTPRequest_AddRef()

static ULONG WINAPI XMLHTTPRequest_AddRef ( IXMLHTTPRequest *  iface)
static

Definition at line 1389 of file httprequest.c.

1390{
1393 TRACE("%p, refcount %lu.\n", iface, ref);
1394 return ref;
1395}

◆ XMLHTTPRequest_create()

HRESULT XMLHTTPRequest_create ( void **  obj)

Definition at line 2088 of file httprequest.c.

2089{
2090 httprequest *req;
2091
2092 TRACE("(%p)\n", obj);
2093
2094 req = malloc(sizeof(*req));
2095 if( !req )
2096 return E_OUTOFMEMORY;
2097
2098 init_httprequest(req);
2099 *obj = &req->IXMLHTTPRequest_iface;
2100
2101 TRACE("returning iface %p\n", *obj);
2102
2103 return S_OK;
2104}

◆ XMLHTTPRequest_get_readyState()

static HRESULT WINAPI XMLHTTPRequest_get_readyState ( IXMLHTTPRequest *  iface,
LONG state 
)
static

Definition at line 1558 of file httprequest.c.

1559{
1561 TRACE("(%p)->(%p)\n", This, state);
1563}

◆ XMLHTTPRequest_get_responseBody()

static HRESULT WINAPI XMLHTTPRequest_get_responseBody ( IXMLHTTPRequest *  iface,
VARIANT body 
)
static

Definition at line 1544 of file httprequest.c.

1545{
1547 TRACE("(%p)->(%p)\n", This, body);
1549}

◆ XMLHTTPRequest_get_responseStream()

static HRESULT WINAPI XMLHTTPRequest_get_responseStream ( IXMLHTTPRequest *  iface,
VARIANT body 
)
static

Definition at line 1551 of file httprequest.c.

1552{
1554 TRACE("(%p)->(%p)\n", This, body);
1556}

◆ XMLHTTPRequest_get_responseText()

static HRESULT WINAPI XMLHTTPRequest_get_responseText ( IXMLHTTPRequest *  iface,
BSTR body 
)
static

Definition at line 1537 of file httprequest.c.

1538{
1540 TRACE("(%p)->(%p)\n", This, body);
1542}

◆ XMLHTTPRequest_get_responseXML()

static HRESULT WINAPI XMLHTTPRequest_get_responseXML ( IXMLHTTPRequest *  iface,
IDispatch **  body 
)
static

Definition at line 1530 of file httprequest.c.

1531{
1533 TRACE("(%p)->(%p)\n", This, body);
1535}

◆ XMLHTTPRequest_get_status()

static HRESULT WINAPI XMLHTTPRequest_get_status ( IXMLHTTPRequest *  iface,
LONG status 
)
static

Definition at line 1516 of file httprequest.c.

1517{
1519 TRACE("(%p)->(%p)\n", This, status);
1521}

◆ XMLHTTPRequest_get_statusText()

static HRESULT WINAPI XMLHTTPRequest_get_statusText ( IXMLHTTPRequest *  iface,
BSTR status 
)
static

Definition at line 1523 of file httprequest.c.

1524{
1526 TRACE("(%p)->(%p)\n", This, status);
1528}

◆ XMLHTTPRequest_getAllResponseHeaders()

static HRESULT WINAPI XMLHTTPRequest_getAllResponseHeaders ( IXMLHTTPRequest *  iface,
BSTR respheaders 
)
static

Definition at line 1495 of file httprequest.c.

1496{
1498 TRACE("(%p)->(%p)\n", This, respheaders);
1499 return httprequest_getAllResponseHeaders(This, respheaders);
1500}

◆ XMLHTTPRequest_GetIDsOfNames()

static HRESULT WINAPI XMLHTTPRequest_GetIDsOfNames ( IXMLHTTPRequest *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 1430 of file httprequest.c.

1432{
1434 HRESULT hr;
1435
1436 TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
1437 lcid, rgDispId);
1438
1439 if(!rgszNames || cNames == 0 || !rgDispId)
1440 return E_INVALIDARG;
1441
1443 if(SUCCEEDED(hr))
1444 {
1445 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
1446 ITypeInfo_Release(typeinfo);
1447 }
1448
1449 return hr;
1450}
@ IXMLHTTPRequest_tid
Definition: msxml_dispex.h:61

◆ XMLHTTPRequest_getResponseHeader()

static HRESULT WINAPI XMLHTTPRequest_getResponseHeader ( IXMLHTTPRequest *  iface,
BSTR  header,
BSTR value 
)
static

Definition at line 1488 of file httprequest.c.

1489{
1491 TRACE("(%p)->(%s %p)\n", This, debugstr_w(header), value);
1493}

◆ XMLHTTPRequest_GetTypeInfo()

static HRESULT WINAPI XMLHTTPRequest_GetTypeInfo ( IXMLHTTPRequest *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 1422 of file httprequest.c.

1424{
1425 TRACE("%p, %u, %lx,%p.\n", iface, iTInfo, lcid, ppTInfo);
1426
1427 return get_typeinfo(IXMLHTTPRequest_tid, ppTInfo);
1428}

◆ XMLHTTPRequest_GetTypeInfoCount()

static HRESULT WINAPI XMLHTTPRequest_GetTypeInfoCount ( IXMLHTTPRequest *  iface,
UINT pctinfo 
)
static

Definition at line 1413 of file httprequest.c.

1414{
1415 TRACE("%p, %p.\n", iface, pctinfo);
1416
1417 *pctinfo = 1;
1418
1419 return S_OK;
1420}

◆ XMLHTTPRequest_Invoke()

static HRESULT WINAPI XMLHTTPRequest_Invoke ( IXMLHTTPRequest *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 1452 of file httprequest.c.

1455{
1457 HRESULT hr;
1458
1459 TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
1460 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1461
1463 if(SUCCEEDED(hr))
1464 {
1465 hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1466 ITypeInfo_Release(typeinfo);
1467 }
1468
1469 return hr;
1470}

◆ XMLHTTPRequest_open()

static HRESULT WINAPI XMLHTTPRequest_open ( IXMLHTTPRequest *  iface,
BSTR  method,
BSTR  url,
VARIANT  async,
VARIANT  user,
VARIANT  password 
)
static

Definition at line 1472 of file httprequest.c.

1474{
1476 TRACE("(%p)->(%s %s %s)\n", This, debugstr_w(method), debugstr_w(url),
1477 debugstr_variant(&async));
1478 return httprequest_open(This, method, url, async, user, password);
1479}

◆ XMLHTTPRequest_put_onreadystatechange()

static HRESULT WINAPI XMLHTTPRequest_put_onreadystatechange ( IXMLHTTPRequest *  iface,
IDispatch sink 
)
static

Definition at line 1565 of file httprequest.c.

1566{
1568 TRACE("(%p)->(%p)\n", This, sink);
1570}

◆ XMLHTTPRequest_QueryInterface()

static HRESULT WINAPI XMLHTTPRequest_QueryInterface ( IXMLHTTPRequest *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1354 of file httprequest.c.

1355{
1357 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
1358
1359 if ( IsEqualGUID( riid, &IID_IXMLHTTPRequest) ||
1362 {
1363 *ppvObject = iface;
1364 }
1366 {
1367 *ppvObject = &This->IObjectWithSite_iface;
1368 }
1369 else if (IsEqualGUID(&IID_IObjectSafety, riid))
1370 {
1371 *ppvObject = &This->IObjectSafety_iface;
1372 }
1373 else if (IsEqualGUID(&IID_ISupportErrorInfo, riid))
1374 {
1375 *ppvObject = &This->ISupportErrorInfo_iface;
1376 }
1377 else
1378 {
1379 TRACE("Unsupported interface %s\n", debugstr_guid(riid));
1380 *ppvObject = NULL;
1381 return E_NOINTERFACE;
1382 }
1383
1384 IUnknown_AddRef((IUnknown *)*ppvObject);
1385
1386 return S_OK;
1387}
const IID IID_IObjectWithSite

◆ XMLHTTPRequest_Release()

static ULONG WINAPI XMLHTTPRequest_Release ( IXMLHTTPRequest *  iface)
static

Definition at line 1397 of file httprequest.c.

1398{
1401
1402 TRACE("%p, refcount %lu.\n", iface, ref);
1403
1404 if (!ref)
1405 {
1407 free(request);
1408 }
1409
1410 return ref;
1411}

◆ XMLHTTPRequest_send()

static HRESULT WINAPI XMLHTTPRequest_send ( IXMLHTTPRequest *  iface,
VARIANT  body 
)
static

Definition at line 1502 of file httprequest.c.

1503{
1505 TRACE("(%p)->(%s)\n", This, debugstr_variant(&body));
1506 return httprequest_send(This, body);
1507}

◆ XMLHTTPRequest_setRequestHeader()

static HRESULT WINAPI XMLHTTPRequest_setRequestHeader ( IXMLHTTPRequest *  iface,
BSTR  header,
BSTR  value 
)
static

Definition at line 1481 of file httprequest.c.

1482{
1484 TRACE("(%p)->(%s %s)\n", This, debugstr_w(header), debugstr_w(value));
1486}

Variable Documentation

◆ AuthenticateVtbl

const IAuthenticateVtbl AuthenticateVtbl
static
Initial value:
= {
}
static HRESULT WINAPI Authenticate_QueryInterface(IAuthenticate *iface, REFIID riid, void **ppv)
Definition: httprequest.c:627
static HRESULT WINAPI Authenticate_Authenticate(IAuthenticate *iface, HWND *hwnd, LPWSTR *username, LPWSTR *password)
Definition: httprequest.c:646
static ULONG WINAPI Authenticate_AddRef(IAuthenticate *iface)
Definition: httprequest.c:634
static ULONG WINAPI Authenticate_Release(IAuthenticate *iface)
Definition: httprequest.c:640

Definition at line 673 of file httprequest.c.

Referenced by BindStatusCallback_create().

◆ BindStatusCallbackVtbl

const IBindStatusCallbackVtbl BindStatusCallbackVtbl
static
Initial value:
= {
}
static ULONG WINAPI BindStatusCallback_AddRef(IBindStatusCallback *iface)
Definition: httprequest.c:271
static HRESULT WINAPI BindStatusCallback_OnObjectAvailable(IBindStatusCallback *iface, REFIID riid, IUnknown *punk)
Definition: httprequest.c:416
static HRESULT WINAPI BindStatusCallback_OnLowResource(IBindStatusCallback *iface, DWORD reserved)
Definition: httprequest.c:325
static HRESULT WINAPI BindStatusCallback_GetPriority(IBindStatusCallback *iface, LONG *pPriority)
Definition: httprequest.c:316
static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface)
Definition: httprequest.c:281
static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallback *iface, DWORD reserved, IBinding *pbind)
Definition: httprequest.c:299
static HRESULT WINAPI BindStatusCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *bind_flags, BINDINFO *pbindinfo)
Definition: httprequest.c:364
static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *iface, HRESULT hr, LPCWSTR error)
Definition: httprequest.c:341
static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallback *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
Definition: httprequest.c:332
static HRESULT WINAPI BindStatusCallback_OnDataAvailable(IBindStatusCallback *iface, DWORD flags, DWORD size, FORMATETC *format, STGMEDIUM *stgmed)
Definition: httprequest.c:393
static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallback *iface, REFIID riid, void **ppv)
Definition: httprequest.c:230

Definition at line 426 of file httprequest.c.

Referenced by BindStatusCallback_create().

◆ BSCHttpNegotiateVtbl

const IHttpNegotiateVtbl BSCHttpNegotiateVtbl
static
Initial value:
= {
}
static HRESULT WINAPI BSCHttpNegotiate_OnResponse(IHttpNegotiate *iface, DWORD code, LPCWSTR resp_headers, LPCWSTR req_headers, LPWSTR *add_reqheaders)
Definition: httprequest.c:569
static HRESULT WINAPI BSCHttpNegotiate_BeginningTransaction(IHttpNegotiate *iface, LPCWSTR url, LPCWSTR headers, DWORD reserved, LPWSTR *add_headers)
Definition: httprequest.c:459
static ULONG WINAPI BSCHttpNegotiate_Release(IHttpNegotiate *iface)
Definition: httprequest.c:453
static ULONG WINAPI BSCHttpNegotiate_AddRef(IHttpNegotiate *iface)
Definition: httprequest.c:447
static HRESULT WINAPI BSCHttpNegotiate_QueryInterface(IHttpNegotiate *iface, REFIID riid, void **ppv)
Definition: httprequest.c:440

Definition at line 619 of file httprequest.c.

Referenced by BindStatusCallback_create().

◆ colspaceW

const WCHAR colspaceW[] = {':',' ',0}
static

◆ crlfW

◆ ObjectSafetyVtbl

const IObjectSafetyVtbl ObjectSafetyVtbl
static
Initial value:
= {
}
static ULONG WINAPI httprequest_Safety_AddRef(IObjectSafety *iface)
Definition: httprequest.c:1701
static HRESULT WINAPI httprequest_Safety_QueryInterface(IObjectSafety *iface, REFIID riid, void **ppv)
Definition: httprequest.c:1695
static HRESULT WINAPI httprequest_Safety_GetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid, DWORD *supported, DWORD *enabled)
Definition: httprequest.c:1713
static HRESULT WINAPI httprequest_Safety_SetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid, DWORD mask, DWORD enabled)
Definition: httprequest.c:1728
static ULONG WINAPI httprequest_Safety_Release(IObjectSafety *iface)
Definition: httprequest.c:1707

Definition at line 1743 of file httprequest.c.

Referenced by init_httprequest().

◆ ObjectWithSiteVtbl

const IObjectWithSiteVtbl ObjectWithSiteVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI httprequest_ObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *punk)
Definition: httprequest.c:1663
static HRESULT WINAPI httprequest_ObjectWithSite_QueryInterface(IObjectWithSite *iface, REFIID riid, void **ppvObject)
Definition: httprequest.c:1599
static ULONG WINAPI httprequest_ObjectWithSite_AddRef(IObjectWithSite *iface)
Definition: httprequest.c:1605
static ULONG WINAPI httprequest_ObjectWithSite_Release(IObjectWithSite *iface)
Definition: httprequest.c:1611
static HRESULT WINAPI httprequest_ObjectWithSite_GetSite(IObjectWithSite *iface, REFIID iid, void **ppvSite)
Definition: httprequest.c:1617

Definition at line 1685 of file httprequest.c.

Referenced by init_httprequest().

◆ safety_supported_options

const DWORD safety_supported_options
static
Initial value:
=
INTERFACESAFE_FOR_UNTRUSTED_CALLER |
INTERFACESAFE_FOR_UNTRUSTED_DATA |
INTERFACE_USES_SECURITY_MANAGER

Definition at line 47 of file httprequest.c.

Referenced by httprequest_Safety_GetInterfaceSafetyOptions(), and httprequest_Safety_SetInterfaceSafetyOptions().

◆ ServerXMLHTTPRequestVtbl

const struct IServerXMLHTTPRequestVtbl ServerXMLHTTPRequestVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI ServerXMLHTTPRequest_getOption(IServerXMLHTTPRequest *iface, SERVERXMLHTTP_OPTION option, VARIANT *value)
Definition: httprequest.c:2014
static HRESULT WINAPI ServerXMLHTTPRequest_get_responseStream(IServerXMLHTTPRequest *iface, VARIANT *body)
Definition: httprequest.c:1979
static HRESULT WINAPI ServerXMLHTTPRequest_send(IServerXMLHTTPRequest *iface, VARIANT body)
Definition: httprequest.c:1930
static HRESULT WINAPI ServerXMLHTTPRequest_getAllResponseHeaders(IServerXMLHTTPRequest *iface, BSTR *respheaders)
Definition: httprequest.c:1923
static HRESULT WINAPI ServerXMLHTTPRequest_abort(IServerXMLHTTPRequest *iface)
Definition: httprequest.c:1937
static HRESULT WINAPI ServerXMLHTTPRequest_setTimeouts(IServerXMLHTTPRequest *iface, LONG resolveTimeout, LONG connectTimeout, LONG sendTimeout, LONG receiveTimeout)
Definition: httprequest.c:2000
static HRESULT WINAPI ServerXMLHTTPRequest_put_onreadystatechange(IServerXMLHTTPRequest *iface, IDispatch *sink)
Definition: httprequest.c:1993
static HRESULT WINAPI ServerXMLHTTPRequest_setOption(IServerXMLHTTPRequest *iface, SERVERXMLHTTP_OPTION option, VARIANT value)
Definition: httprequest.c:2021
static HRESULT WINAPI ServerXMLHTTPRequest_open(IServerXMLHTTPRequest *iface, BSTR method, BSTR url, VARIANT async, VARIANT user, VARIANT password)
Definition: httprequest.c:1900
static HRESULT WINAPI ServerXMLHTTPRequest_setRequestHeader(IServerXMLHTTPRequest *iface, BSTR header, BSTR value)
Definition: httprequest.c:1909
static HRESULT WINAPI ServerXMLHTTPRequest_waitForResponse(IServerXMLHTTPRequest *iface, VARIANT timeout, VARIANT_BOOL *isSuccessful)
Definition: httprequest.c:2007
static HRESULT WINAPI ServerXMLHTTPRequest_GetTypeInfoCount(IServerXMLHTTPRequest *iface, UINT *pctinfo)
Definition: httprequest.c:1840
static HRESULT WINAPI ServerXMLHTTPRequest_get_responseBody(IServerXMLHTTPRequest *iface, VARIANT *body)
Definition: httprequest.c:1972
static HRESULT WINAPI ServerXMLHTTPRequest_QueryInterface(IServerXMLHTTPRequest *iface, REFIID riid, void **obj)
Definition: httprequest.c:1787
static HRESULT WINAPI ServerXMLHTTPRequest_GetIDsOfNames(IServerXMLHTTPRequest *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: httprequest.c:1858
static HRESULT WINAPI ServerXMLHTTPRequest_GetTypeInfo(IServerXMLHTTPRequest *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: httprequest.c:1850
static ULONG WINAPI ServerXMLHTTPRequest_AddRef(IServerXMLHTTPRequest *iface)
Definition: httprequest.c:1816
static HRESULT WINAPI ServerXMLHTTPRequest_getResponseHeader(IServerXMLHTTPRequest *iface, BSTR header, BSTR *value)
Definition: httprequest.c:1916
static HRESULT WINAPI ServerXMLHTTPRequest_Invoke(IServerXMLHTTPRequest *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: httprequest.c:1880
static HRESULT WINAPI ServerXMLHTTPRequest_get_status(IServerXMLHTTPRequest *iface, LONG *status)
Definition: httprequest.c:1944
static HRESULT WINAPI ServerXMLHTTPRequest_get_responseXML(IServerXMLHTTPRequest *iface, IDispatch **body)
Definition: httprequest.c:1958
static ULONG WINAPI ServerXMLHTTPRequest_Release(IServerXMLHTTPRequest *iface)
Definition: httprequest.c:1824
static HRESULT WINAPI ServerXMLHTTPRequest_get_readyState(IServerXMLHTTPRequest *iface, LONG *state)
Definition: httprequest.c:1986
static HRESULT WINAPI ServerXMLHTTPRequest_get_responseText(IServerXMLHTTPRequest *iface, BSTR *body)
Definition: httprequest.c:1965
static HRESULT WINAPI ServerXMLHTTPRequest_get_statusText(IServerXMLHTTPRequest *iface, BSTR *status)
Definition: httprequest.c:1951

Definition at line 2028 of file httprequest.c.

Referenced by ServerXMLHTTP_create().

◆ SupportErrorInfoVtbl

const ISupportErrorInfoVtbl SupportErrorInfoVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI SupportErrorInfo_InterfaceSupportsErrorInfo(ISupportErrorInfo *iface, REFIID riid)
Definition: httprequest.c:1769
static ULONG WINAPI SupportErrorInfo_AddRef(ISupportErrorInfo *iface)
Definition: httprequest.c:1757
static HRESULT WINAPI SupportErrorInfo_QueryInterface(ISupportErrorInfo *iface, REFIID riid, void **obj)
Definition: httprequest.c:1751
static ULONG WINAPI SupportErrorInfo_Release(ISupportErrorInfo *iface)
Definition: httprequest.c:1763

Definition at line 1778 of file httprequest.c.

Referenced by init_httprequest().

◆ XMLHTTPRequestVtbl

const struct IXMLHTTPRequestVtbl XMLHTTPRequestVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI XMLHTTPRequest_GetTypeInfo(IXMLHTTPRequest *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: httprequest.c:1422
static HRESULT WINAPI XMLHTTPRequest_get_status(IXMLHTTPRequest *iface, LONG *status)
Definition: httprequest.c:1516
static HRESULT WINAPI XMLHTTPRequest_open(IXMLHTTPRequest *iface, BSTR method, BSTR url, VARIANT async, VARIANT user, VARIANT password)
Definition: httprequest.c:1472
static HRESULT WINAPI XMLHTTPRequest_put_onreadystatechange(IXMLHTTPRequest *iface, IDispatch *sink)
Definition: httprequest.c:1565
static HRESULT WINAPI XMLHTTPRequest_getAllResponseHeaders(IXMLHTTPRequest *iface, BSTR *respheaders)
Definition: httprequest.c:1495
static ULONG WINAPI XMLHTTPRequest_Release(IXMLHTTPRequest *iface)
Definition: httprequest.c:1397
static ULONG WINAPI XMLHTTPRequest_AddRef(IXMLHTTPRequest *iface)
Definition: httprequest.c:1389
static HRESULT WINAPI XMLHTTPRequest_get_responseXML(IXMLHTTPRequest *iface, IDispatch **body)
Definition: httprequest.c:1530
static HRESULT WINAPI XMLHTTPRequest_setRequestHeader(IXMLHTTPRequest *iface, BSTR header, BSTR value)
Definition: httprequest.c:1481
static HRESULT WINAPI XMLHTTPRequest_get_responseText(IXMLHTTPRequest *iface, BSTR *body)
Definition: httprequest.c:1537
static HRESULT WINAPI XMLHTTPRequest_QueryInterface(IXMLHTTPRequest *iface, REFIID riid, void **ppvObject)
Definition: httprequest.c:1354
static HRESULT WINAPI XMLHTTPRequest_get_readyState(IXMLHTTPRequest *iface, LONG *state)
Definition: httprequest.c:1558
static HRESULT WINAPI XMLHTTPRequest_get_responseBody(IXMLHTTPRequest *iface, VARIANT *body)
Definition: httprequest.c:1544
static HRESULT WINAPI XMLHTTPRequest_getResponseHeader(IXMLHTTPRequest *iface, BSTR header, BSTR *value)
Definition: httprequest.c:1488
static HRESULT WINAPI XMLHTTPRequest_get_statusText(IXMLHTTPRequest *iface, BSTR *status)
Definition: httprequest.c:1523
static HRESULT WINAPI XMLHTTPRequest_abort(IXMLHTTPRequest *iface)
Definition: httprequest.c:1509
static HRESULT WINAPI XMLHTTPRequest_get_responseStream(IXMLHTTPRequest *iface, VARIANT *body)
Definition: httprequest.c:1551
static HRESULT WINAPI XMLHTTPRequest_GetIDsOfNames(IXMLHTTPRequest *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: httprequest.c:1430
static HRESULT WINAPI XMLHTTPRequest_send(IXMLHTTPRequest *iface, VARIANT body)
Definition: httprequest.c:1502
static HRESULT WINAPI XMLHTTPRequest_Invoke(IXMLHTTPRequest *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: httprequest.c:1452
static HRESULT WINAPI XMLHTTPRequest_GetTypeInfoCount(IXMLHTTPRequest *iface, UINT *pctinfo)
Definition: httprequest.c:1413

Definition at line 1572 of file httprequest.c.

Referenced by init_httprequest().