Upgrade Mongoose to the latest version. The current version of
Mongoose contains breaking changes, so it is a complex task.
This may or may not be needed immediately.
The upgraded mongoose library
- contains additional protocols that would be available in flightgear.
- has breaking changes in its API affecting flightgear/src/Network/httpd.cxx/hxx
- has the same licence as the version in flightgear/src/3rdparty/mongoose/LICENSE. see https://github.com/cesanta/mongoose/blob/master/LICENSE
- a search of flightgear/src shows the changes would be limted to about 200 lines in code modules containing the strings "mg_", "mongoose", or "Connection, mostly found in files in flightgear/src/Network
- only lines that directly use the mongoose api, or rely on data from any structure produced by mongoose will be affected.
- Src/FDM/SP /ADA.cxx is out of scope. it contains the string "Connection" but uses SGSocket for udp, not mongoose, so need not be considered.
Strategy:
Establish a temporary project to compare the mongoose.c and mongoose.h files from flightgear/3rdparty with the latest version from https://mongoose.ws/.
Fully understand the api differences and their effect on flightgear code
Notes on api change as attachment or reply to this ticket
This change is non-trivial. Between version 5 and version 7, the API has changed and most of the 200 lines of code will be affected. Mongoose has adopted an event model as its core and that changes error handling, the reference of items inside an http or web socket request. That's just about everything.
Understanding this change by someone not well versed in C++ practice, will require a fairly complete documentation of the existing code, so that's where I''m starting.