In OGC WMS standard, the empty string represents the default style.
QGIS Server when it parses the parameters, QGIS Server when it parses parameters it removes empty parts.
When all requested styles are default ones it's equal to an empty parameter STYLE, as defined in the standard.
When only one layer is requested, there is no issue with custom or default style.
When multiple layers are requested and some with custom styles, because QGIS Server does not retain empty strings, it loses the layer / style match.
To fix it, keeps empty parts for not empty styles parameters.
Fixed#19795 QGIS Server 3 / WMS: the SLD parameter support has been removed
To reactivate SLD parameter support, we add a new conversion capability in server parameter `toUrl`. And the capabilty to load the content associted to an URL.
Then if the SLD parameter is defined, the content is loaded and the SLD_BODY is set.