synopse / mORMot

Synopse mORMot 1 ORM/SOA/MVC framework - Please upgrade to mORMot 2 !
https://synopse.info
785 stars 323 forks source link

THttpServer.OnHttpRequest - Ctxt.RemoteIP is empty #439

Closed ysair closed 1 year ago

ysair commented 1 year ago

SynCrtSock.pas

procedure THttpServer.Process(ClientSock: THttpServerSocket;
  ConnectionID: THttpServerConnectionID; ConnectionThread: TSynThread);
...
  ctxt := THttpServerRequest.Create(self,ConnectionID,ConnectionThread);
  try
    respsent := false;
    with ClientSock do
      ctxt.Prepare(URL,Method,HeaderGetText(fRemoteIP),Content,ContentType,'',ClientSock.fTLS);
//change to
      ctxt.Prepare(URL,Method,HeaderGetText(fRemoteIP),Content,ContentType,fRemoteIP,ClientSock.fTLS);
...
synopse commented 1 year ago

It may be time to switch to mORMot 2 anyway. ;)

ysair commented 1 year ago

so fast!