View Issue Details

IDProjectCategoryView StatusLast Update
0004944libmicrohttpddocumentationpublic2020-11-14 12:23
ReporterChristian Grothoff Assigned To 
Status newResolutionopen 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product VersionGit master 
Summary0004944: tutorial should cover HTTP Upgrade API
DescriptionWe should show a stripped-down example for how to use the upgrade API.
TagsNo tags attached.



2017-05-15 22:12

developer   ~0012134

Could we close this Issue?

Christian Grothoff

2017-05-15 23:02

manager   ~0012135

Eh, no, there is AFAIK nothing in doc/libmicrohttpd-tutorial.texi about upgrade yet.


2020-11-14 03:49

reporter   ~0017132

Hello! Was trying to do just this. Or at least I think so (Upgrade HTTP to HTTPS).

Don't think I nailed it because if I activate MHD_USE_TLS I can't receive HTTP connections (Errors with Handshake out of context)...and if I take it away—I get the following complaints:

On startup:

    MHD HTTPS option 8 passed to MHD but MHD_USE_TLS not set.
    MHD HTTPS option 9 passed to MHD but MHD_USE_TLS not set.

On Request:

    curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:8080

Would love some help!

Christian Grothoff

2020-11-14 12:23

manager   ~0017140

This issue is not about upgrading from http to https, but about the HTTP upgrade to another protocol (usually WebSockets) feature.
To 'upgrade' to HTTPS, all you need to do is
1) run 2 MHD daemons (so you must do MHD_start_daemon *twice*), and
2) Use a redirect (301/302) from the HTTP-daemon to the HTTPS address.

Issue History

Date Modified Username Field Change
2017-03-08 00:05 Christian Grothoff New Issue
2017-05-15 22:12 Karlson2k Note Added: 0012134
2017-05-15 23:02 Christian Grothoff Note Added: 0012135
2020-11-14 03:49 mucholove Note Added: 0017132
2020-11-14 12:23 Christian Grothoff Note Added: 0017140