Open ijmitch opened 7 years ago
Should CICS demand a DFHWBOPT program? If it does, everyone needs to have one. The alternative would be to default back to the existing behaviour if there's no DFHWBOPT program definition installed.
I would prefer the latter, default back to existing behaviour if no DFHWBOPT is installed. This goes against my initial reaction where I expected CICS to handle OPTIONS request. In reality, an opt-in approach would have the least amount of resistance from customers across the globe. If you do not opt-in, you will be aware that you are receiving and rejecting OPTIONS requests by the presence of DFHWB0762 messages.
A mechanism along the lines of the Web Error Program might be the most appropriate - in the same way that Liberty asks for the CORS information to be part of the server configuration, this program would be a way to select the information to be returned as a response to OPTIONS.
Define a new URM, say DFHWBOPT, which has the responsibility to respond to the OPTIONS request. CICS could make EXEC CICS WEB EXTRACT commands work in this URM so that it would be possible to find out the resource being queried (there would be no need to query for the HTTP verb since CICS would only drive DFHWBOPT for an OPTIONS request).
Your DFHWBOPT program then just has to construct the reply... something that DFHWBEP is already tasked with. You would be free to derive that anyway you like:
Should CICS demand a DFHWBOPT program? If it does, everyone needs to have one. The alternative would be to default back to the existing behaviour if there's no DFHWBOPT program definition installed.