Access violation in version 1543 in TROWinHttpWorker.Callback with the OpenAPI dispatcher

The latest 1543 seems to have a problem in TROBaseHTTPServer.ProcessRequest. You have added som new code to handle OPTIONS (preflight) requests. If so, you exit the method, but at that stage the out parameter aResponseStream is initialized to nil. The TROWinHttpWorker.Callback does not handle a nil l_responsestream. It looks like that the other transports will have the same problem.

Logged as bugs://D19270.


pls update uROBaseHTTPServer.pas as

procedure TROBaseHTTPServer.ProcessRequest(const aTransport: IROHTTPTransportEx;
  const aRequestStream: TStream; out aResponseStream: TROBinaryMemoryStream;
  const aResponse: IROHTTPResponse);
  // special processing for OPTIONS
  if Supports(aTransport, IROHTTPRequest, l_httpRequest) then try
    if l_httpRequest.Method = id_Method_Options then begin
      aResponseStream := TROBinaryMemoryStream.Create; //<<<<<<<<<<< added

bugs://D19270 was closed as fixed.