feat(httpsys): add Lazarus/FPC compatibility on Windows - #473
Merged
viniciussanchez merged 1 commit intoJun 24, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumo
Este PR adiciona suporte para compilação e execução do provider nativo HTTP.sys do Windows (
Horse.Provider.HttpSys.pas) utilizando o Lazarus/FPC na plataforma Windows.Alterações Propostas
Horse.Provider.HttpSys.paseHorse.paspara importar condicionalmentehttpprotocol(que forneceHTTPDecode) e coleções genéricas sem os namespaces do Delphi quando sob FPC.TNetEncoding.URL.DecodeporHTTPDecodequando FPC estiver definido.System.Threadinge suporte completo a métodos anônimos da mesma forma que o Delphi, foi introduzida a classeTHttpSysRequestThread(herdeira deTThread) para processar requisições de forma concorrente no FPC, mantendo o pool doTTask.Runintacto no Delphi.TWebResponseem{$IFNDEF FPC}, uma vez que no FPC a classe base herda deTResponse(da unitfpHTTPdo Lazarus) e não exige esses overrides.Access Violationno FPC durante oclass constructordo provider ao usarTIStringComparer.Ordinal(causado pela ordem de inicialização das units no FPC). Ajustamos para usar o construtor padrãoTDictionary.Createsob FPC.samples/lazarus/httpsys(escutando na porta 9095 para evitar conflitos).*.ppuà lista de arquivos ignorados do Lazarus.Verificação e Testes
Server: Microsoft-HTTPAPI/2.0) efetuada com sucesso utilizando a demo do Lazarus.