Menu

#92 gsoapWinInet: Add HTTP2 support

closed
None
5
2015-11-29
2015-11-19
mberchtold
No

This code snippet adds HTTP2 support to the WinInet plugin:

In wininet_init, after InternetOpenA add:

#ifdef INTERNET_OPTION_ENABLE_HTTP_PROTOCOL
    DWORD httpProtocol = HTTP_PROTOCOL_FLAG_HTTP2;
    VERIFY(InternetSetOption(a_pData->hInternet, INTERNET_OPTION_ENABLE_HTTP_PROTOCOL, &httpProtocol, sizeof(httpProtocol)));
#endif

Discussion

  • mberchtold

    mberchtold - 2015-11-19

    Correction: VERIFY should be removed as the feature is only available on Windows 10 and higher:

    #ifdef INTERNET_OPTION_ENABLE_HTTP_PROTOCOL
        DWORD httpProtocol = HTTP_PROTOCOL_FLAG_HTTP2;
        InternetSetOption(a_pData->hInternet, INTERNET_OPTION_ENABLE_HTTP_PROTOCOL, &httpProtocol, sizeof(httpProtocol));
    #endif
    
     
  • Robert van Engelen

    Feature included with 2.8.26.

     
  • Robert van Engelen

    • status: open --> closed
    • assigned_to: Robert van Engelen
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.