Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. Qhttpserver unable to run on https protocol using ssl.
QtWS25 Last Chance

Qhttpserver unable to run on https protocol using ssl.

Scheduled Pinned Locked Moved C++ Gurus
6 Posts 2 Posters 2.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Narottam
    wrote on last edited by
    #1

    hi,
    I am using below code for run Cplusplus RestAPI using "qhttpserver" http server on http protocol. But i want to server run on https protocol. I have spent couple of days to run "qhttpserver" server on https protocols. Please Tell me how we can solve this problem. Reply as soon as possible.

    int main()
    {
    QHttpServer server = new QHttpServer(this);
    connect(server, SIGNAL(newRequest(QHttpRequest
    , QHttpResponse*)),
    this, SLOT(handleRequest(QHttpRequest*, QHttpResponse*)));
    server->listen(QHostAddress::Any, 8080);

    return 0;
    }

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      Do you know if your QHttpServer supports SSL?

      QHttpServer is not part of Qt. Where did you get it from? (I found at least 2 different projects containing "QHttpServer": https://github.com/nikhilm/qhttpserver and http://xmelegance.org/qxservlet/classdocs/classQHttpServer.html )

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • N Offline
        N Offline
        Narottam
        wrote on last edited by
        #3

        Hi,
        Thanks for reply.
        I have post these question to nikhilm github repository.
        You are right QHttpServer is not part of Qt. I download these server from https://github.com/nikhilm/qhttpserver. I am trying to solve it. If you got any solution please sent me .

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          I've never used QHttpServer before, so I don't know much about it, sorry. It's probably best if you ask the author.

          I had a quick look at nikhilm's code, but I couldn't find any built-in SSL support. If you want to use HTTPS, you might need to create and manage your own SSL sockets to transfer the HTTP data. See "QSslSocket":http://qt-project.org/doc/qt-5/QSslSocket.html

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • N Offline
            N Offline
            Narottam
            wrote on last edited by
            #5

            Thanks lots for contribute and suggest me .
            I ask with author. He give me some ssl "#include <QSslSocket>" and library link . and you are right i need create ssl certificate and manage with QHttpserver server so that HTTPS secure socket will we enable.
            Thanks again . If i face some problem then i will contact again.

            1 Reply Last reply
            0
            • JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #6

              You're welcome. :) Good luck!

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved