Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2018-12

FPC-based http/s server

5 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mr Bee

Hi all,
Is there any open source, maintained and updated HTTP server using FPC out there? I need a lightweight HTTP server written in FPC that supports Linux/Unix, F/CGI app, and HTTPS. It'd be better if it doesn't need external or third-party units such as Indy or Synapse, but only pure FPC standard units such as fpHTTP* and fpWeb* units. Google only gave me some old (back to early 2000) and abandoned projects written in Delphi mixed with inline assembler and Windows' API, also don't support HTTPS. Thank you.
Regards,
–Mr Bee

Reply by email

Michael Van Canneyt
to Mr Bee
Mr Bee wrote 7 lines
Hi all, Is there any open source, maintained and updated HTTP server using FPC out there? I need a lightweight HTTP server written in FPC that supports Linux/Unix, F/CGI app, and HTTPS. It'd be better if it doesn't need external or third-party units such as Indy or Synapse, but only pure FPC standard units such as fpHTTP* and fpWeb* units. Google only gave me some old (back to early 2000) and abandoned projects written in Delphi mixed with inline assembler and Windows' API, also don't support HTTPS.

FPC has a HTTP server. See the simpleserver demo under fcl-web.

It does not support https yet, but this is planned for the near future. (I expect to work on it between this Christmas and new year)

It does not support forwarding requests to (F)CGI but this is easy enough to add.

Michael.

Reply by email

Alexander Grotewohl
to Michael Van Canneyt

Mr. Bee, you could use stunnel in the meantime, and look into implementing fcgi into simpleserver? :)

What's your objective? Small servers like mini_httpd can be made to run freepascal binaries with little fuss, and would be sufficient for everything up until professional usage. At which point I would advise using apache or nginx anyways.

Michael, neat, didn't know that was in there. Will have to check it out.

Alex

Michael Van Canneyt wrote 29 lines
On Mon, 10 Dec 2018, Mr Bee via fpc-pascal wrote: > Hi all, Is there any open source, maintained and updated HTTP server > using > FPC out there?  I need a lightweight HTTP server written in FPC that > supports Linux/Unix, F/CGI app, and HTTPS.  It'd be better if it doesn't > need external or third-party units such as Indy or Synapse, but only > pure > FPC standard units such as fpHTTP* and fpWeb* units.  Google only > gave me > some old (back to early 2000) and abandoned projects written in Delphi > mixed with inline assembler and Windows' API, also don't support HTTPS. FPC has a HTTP server. See the simpleserver demo under fcl-web. It does not support https yet, but this is planned for the near future. (I expect to work on it between this Christmas and new year) It does not support forwarding requests to (F)CGI but this is easy enough to add. Michael. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

silvioprog
to Michael Van Canneyt: FPC has a HTTP server. See the simpleserver demo under fcl-web. It does not support https…

Hello dude,

On Mon, Dec 10, 2018 at 8:09 AM Michael Van Canneyt wrote:
[...]

It does not support https yet, but this is planned for the near future. (I expect to work on it between this Christmas and new year)

Please consider support for TLS 1.3 <https://www.ietf.org/blog/tls13/> (all new web servers should use it).

GnuTLS <https://www.gnutls.org/> is a very good library (I've used it about two years at company). Its API is clean, small, massively documented <https://www.gnutls.org/documentation.html>, and its ABI is very stable (about 99.83~100% between 2015-2018).

Cheers

p.s.: I made a X.509 based authentication using OpenSSL. Its API is a little bit ugly and confuse, so I spent about three weeks working on that. After, I did the same work using GnuTLS, so I spent just five days because its API is better and contais this good manual
<https://www.gnutls.org/manual/gnutls.pdf>.

Silvio Clécio

Reply by email

Bo Berglund
to Mr Bee: Is there any open source, maintained and updated HTTP server using FPC out there? I need…
Mr Bee wrote
Hi all, Is there any open source, maintained and updated HTTP server using FPC out there?

Yes as part of the Indy10 suite. Indy has been part of Delphi for many years and is easily installed in Lazarus/Fpc too using the OnLine Package Manager.

You can also get all the sources via SVN:
https://svn.atozed.com:444/!/#Indy10

Read Only Login: Indy-Public-RO (Empty password)

I use it all the times for all needs concerning network operations. It has a LOT of specialized components like servers and clients of various types.

And there is a dedicated forum where the maintainers can be reached for questions and advice:
https://www.atozed.com/forums/forumdisplay.php?fid=9

Bo Berglund Developer in Sweden

Reply by email