Hi Simon
I know you're asking a generic question about how Web Dynpro *should* handle duplicate parameters... unfortunately, I'm not clever enough to answer that one.
But I think can answer the specific question about how Web Dynpro *does* handle duplicate 'sap-wd-configId' parameters.
The 'sap-wd-configId' parameter is actually read in method CL_WDR_CLIENT_ABSTRACT_HTTP=>CREATE_APPLICATION:
l_config_id = request->get_form_field( cl_wdr_client_constants=>config_id ).
The GET_FORM_FIELD method uses:
system-call ict did ihttp_scid_get_form_field
to read the specific config parameter and this system-call seems to return only the first parameter value if there is more than one parameter with the same id. This is why your Web Dynpro app would not be receiving the second config id.
Just for clarification, the bit of code you found in CL_WDR_CLIENT_ABSTRACT_HTTP=>GET_FORM_FIELDS_EXTENDED retrieves all of the query parameters at once using:
system-call ict did ihttp_scid_get_form_fields
but it does this for a different purpose (I think it stores it in the WD window object for later use, or something...)
This system-call will return all parameters, even the duplicates, but this is not how Web Dynpro is specifically handling the WD config id parameter.
I hope this helps a bit.
Regards
Glen