× Third party announcements.
If you want to share with others your project or applications, build with CT, you can do it here.

Question Sharing code - Apache httpd module

  • lucabertoncini@inwind.it
  • Topic Author
  • Visitor
  • Visitor
5 years 9 months ago #7220 by lucabertoncini@inwind.it
Sharing code - Apache httpd module was created by lucabertoncini@inwind.it
Hello to all Pascal developers!
I'm a freelancer, my clients, in these years, are asking me software solutions that can serve information to different application such as desktop, web and/or mobile. For this reason I've changed the way I approach the problems they have from a client / server structure to a modular “three-tier” model.
The base solution I've developed, is now the start point for every new application.
The basic idea has been to write a Httpd Apache Module that can answer to HTTP requests, so, to avoid writing an Apache Module from scratch every time, I wrote a little module called “fpcProxy” that receives an HTTP request, decodes it and finds the external library (listed in the file “HttpdProxyLibraries.dat”) which must elaborate the answer, then takes the answer and sends it back.
In the 7z file you will find a schema that illustrate the idea.

All requests and answers are a json data serialization.

Thanks to this code now I need only to develop the library that answers to the requests and I can forget the Apache interface.

I don't know if this code can be useful to someone else, I hope someone will find it interesting and will help me to improve it.
Attachments:

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
5 years 9 months ago #7221 by Sternas Stefanos
Replied by Sternas Stefanos on topic Sharing code - Apache httpd module
Thanks Sir
tomorrow we will test your code

PilotLogic Architect and Core Programmer
The following user(s) said Thank You: lucabertoncini@inwind.it

Please Log in or Create an account to join the conversation.

  • lucabertoncini@inwind.it
  • Topic Author
  • Visitor
  • Visitor
5 years 8 months ago #7493 by lucabertoncini@inwind.it
Replied by lucabertoncini@inwind.it on topic Sharing code - Apache httpd module
Hello CT's developers, there is something strange in package lz_fpweb in CT 5.30.
Usually, after rebuilding IDE with the option -Cg, I compiled the source code that you can find in the previous attachment without any problem and it worked well. With this version of CT, Apache Httpd raises an exception “EHTTP: No REQUEST_METHOD passed from server”. I came back to the previous version 5.20 and I saw that the package weblaz (in 5.20) was replaced by lz_fpweb. Can I use CT 5.30 to compile Apache modules with particular compiler options?
Thank you very much.

Luca

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
5 years 8 months ago #7494 by Sternas Stefanos
Replied by Sternas Stefanos on topic Sharing code - Apache httpd module
Sir
we change only the name of the pkg
I think must work OK with CT 5.3

PilotLogic Architect and Core Programmer
The following user(s) said Thank You: lucabertoncini@inwind.it

Please Log in or Create an account to join the conversation.

  • lucabertoncini@inwind.it
  • Topic Author
  • Visitor
  • Visitor
5 years 8 months ago #7495 by lucabertoncini@inwind.it
Replied by lucabertoncini@inwind.it on topic Sharing code - Apache httpd module
Ok, thank you. I'll try again.

Please Log in or Create an account to join the conversation.