Beispiel #1
0
HRESULT __RPC_STUB IWinInetHttpInfo_QueryInfo_Stub(IWinInetHttpInfo* This,
    DWORD dwOption, BYTE *pBuffer, DWORD *pcbBuf, DWORD *pdwFlags,
    DWORD *pdwReserved)
{
    TRACE("(%p %x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuf, pdwFlags, pdwReserved);
    return IWinInetHttpInfo_QueryInfo(This, dwOption, pBuffer, pcbBuf, pdwFlags, pdwReserved);
}
Beispiel #2
0
void process_document_response_headers(HTMLDocumentNode *doc, IBinding *binding)
{
    IWinInetHttpInfo *http_info;
    char buf[1024];
    DWORD size;
    HRESULT hres;

    hres = IBinding_QueryInterface(binding, &IID_IWinInetHttpInfo, (void**)&http_info);
    if(FAILED(hres)) {
        TRACE("No IWinInetHttpInfo\n");
        return;
    }

    size = sizeof(buf);
    strcpy(buf, "X-UA-Compatible");
    hres = IWinInetHttpInfo_QueryInfo(http_info, HTTP_QUERY_CUSTOM, buf, &size, NULL, NULL);
    if(hres == S_OK && size) {
        compat_mode_t document_mode;
        WCHAR *header;

        TRACE("size %u\n", size);

        header = heap_strdupAtoW(buf);
        if(header && parse_ua_compatible(header, &document_mode)) {
            TRACE("setting document mode %d\n", document_mode);
            set_document_mode(doc, document_mode, FALSE);
        }
        heap_free(header);
    }

    IWinInetHttpInfo_Release(http_info);
}
Beispiel #3
0
static DWORD get_http_status_code(IBinding *binding)
{
    IWinInetHttpInfo *http_info;
    DWORD status, size = sizeof(DWORD);
    HRESULT hres;

    hres = IBinding_QueryInterface(binding, &IID_IWinInetHttpInfo, (void**)&http_info);
    if(FAILED(hres))
        return HTTP_STATUS_OK;

    hres = IWinInetHttpInfo_QueryInfo(http_info, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER,
            &status, &size, NULL, NULL);
    IWinInetHttpInfo_Release(http_info);

    if(FAILED(hres))
        return HTTP_STATUS_OK;
    return status;
}