Forums » Development »
[Solved] Porting an old plugin from old lighttpd to latest version
Added by eldho about 1 year ago
HI
I was working on porting a http uri handler to the latest version of lighttpd But i have am facing problems.
1. previously i was using this (s_len = con->uri.path->used - 1;) but now am getting error
2.if (!buffer_is_empty(r->uri.query)) not working
3.Also i was not able to find 'response_header_overwrite' function
i was using a pretty old version. Need help for this porting
Replies (4)
RE: Porting a old plugin from old llighttpd to latest version - Added by gstrauss about 1 year ago
Please read this really, really, really carefully and then "read my mind", similar to your post.
How to get support
RE: Porting an old plugin from old lighttpd to latest version - Added by gstrauss about 1 year ago
I'll summarize: you're using an ancient version of lighttpd. You tried to compile against current lighttpd code without making any changes to your code. Unsurprisingly, it did not work. You haven't bothered to look at changed interfaces in the many, many years since your plugin was developed.
Need help for this porting
You are not asking for help. You are asking someone to do your job for you for free, when you are probably paid to do your job.
If you're not able or willing to program this yourself, then please prepare an RFP and offer to pay someone to do it for you.
Perhaps whatever it is that you wrote should no longer be maintained as a plugin, but rather as a separate FastCGI app.
Alternatively, port your app to mod_magnet and use lua.
RE: Porting an old plugin from old lighttpd to latest version - Added by eldho about 1 year ago
Thanks for the quick reply !
Keep up the good work !
I am new to lighttpd , that's why this stupid question...
I have made changes and got the lib compiled.
But i will try to modify it as you suggested as a separate FastCGI app .
I like to know if any detailed document for api is available?
Thanks !
RE: Porting an old plugin from old lighttpd to latest version - Added by gstrauss about 1 year ago
I am new to lighttpd , that's why this stupid question...
Asking good technical questions is possible whether or not you are new to something.
Things like "What happened to response_header_overwrite
?" should have been easily discovered by you looking in the git history.
I like to know if any detailed document for api is available?
The lighttpd code base is not very large, so the .h files are a good start, as is looking at other modules as examples. Most lighttpd modules are < 600 lines of C code, with 25% or more of that being boilerplate for fast configuration processing at runtime.
Note: lighttpd developers do not guarantee C code API or ABI compatibility between releases.
On the other hand, the mod_magnet API is documented in mod_magnet, and is stable.
In my experience, most ancient custom plugins should no longer be custom plugins. lighttpd has addressed many of the shortcomings for which ancient plugins previously had been written.
Those ancient custom plugins are often better (and more easily compatible with future lighttpd versions) if rewritten as FastCGI apps or rewritten in lua for mod_magnet, e.g. lua examples of lighttpd modules.
If you have a different custom need and can describe it, we can discuss further.