FPC-based http/s server

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

FPC-based http/s server

Free Pascal - General mailing list
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


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC-based http/s server

Michael Van Canneyt


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  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC-based http/s server

Alexander Grotewohl

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

On 12/10/2018 6:08 AM, Michael Van Canneyt wrote:


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  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC-based http/s server

silvioprog
In reply to this post by Michael Van Canneyt
Hello dude,

On Mon, Dec 10, 2018 at 8:09 AM Michael Van Canneyt <[hidden email]> 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 (all new web servers should use it).

GnuTLS is a very good library (I've used it about two years at company). Its API is clean, small, massively documented, 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.

--
Silvio Clécio

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC-based http/s server

Bo Berglund
In reply to this post by Free Pascal - General mailing list
On Mon, 10 Dec 2018 10:33:06 +0000 (UTC), Mr Bee via fpc-pascal
<[hidden email]> 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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal