Recent

Author Topic: HTTP2 Support  (Read 213 times)

Amir61

  • New Member
  • *
  • Posts: 49
    • http://Amir.Aavani.net
HTTP2 Support
« on: May 13, 2026, 07:58:14 am »
Hi,

I have been working on a Proto Compiler for Pascal (Here is the [https://github.com/AmirAavani/PB2PAS]repo[/url]). I have been able to implement Marshaling and Unmarshaling of proto3. Recently I took a stab at generating code of Services (as I need it for a project of mine). The problem is that GRPC requires http2 support and I have not been able to figure out where to find an http2 library.

 

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1285
Re: HTTP2 Support
« Reply #1 on: May 13, 2026, 10:10:34 am »
Hi,

I have been working on a Proto Compiler for Pascal.

Here is the repo.

I have been able to implement Marshaling and Unmarshaling of proto3.

Recently I took a stab at generating code of Services (as I need it for a project of mine).

The problem is that GRPC requires http2 support and I have not been able to figure out where to find an http2 library.

Free Pascal offers limited native support for HTTP/2, but full and functional implementation mainly depends on the use of third-party libraries or specific frameworks, as the standard fcl-web library focuses more on HTTP/1.1 and basic components.

https://github.com/iLya2IK/wchttpserver

The main solution available is the wchttpserver project, a server written in Lazarus/Free Pascal that supports HTTP/2, HTTP/1.1, and WebSocket. This project builds on the fpWeb modules (part of the Free Component Library) and extends its functionality with the following features:

- Protocols: Support for HTTP/2 (RFC 7540) and HTTP/1.1, with the ability to switch between modes.

- Security: Uses modified OpenSSL modules to create and maintain HTTP/2 connections, including TLS support.

- WebSocket: Supports the WebSocket protocol (RFC 6455) with the "permessage-deflate" extension (RFC 7692). Additional Features: Includes gzip/deflate compression, session management via cookies, multithreading with thread pools, and SQLite data persistence.

- Dependencies: Requires Free Pascal v3.2.0+, Lazarus v2.0.10+, OpenSSL (v1.1.0 or higher), SQLite, and Zlib.

For HTTP/2 clients, the standard Free Pascal ecosystem (via fcl-web or TFPHttpClient) does not provide robust documented native support for HTTP/2, generally focusing on HTTP/1.1. For advanced HTTP/2 needs, the recommended approach is to use the wchttpserver server or integrate external libraries via bindings, although specific documentation for pure HTTP/2 clients in Pascal is scarce compared to server solutions.

 

TinyPortal © 2005-2018