Forum > Networking and Web Programming

HTTP/2+HTTP/1.1+WebSocket server written with Lazarus (Free Pascal)

<< < (3/3)

Decompression of client-side requests added. Only the deflate unpacking method is currently supported on the server-side
Look at main.js and server.cnf.
To implement compression on client-side used zlib.js

--- Code: Javascript  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---if (content.length > 200) {    var plain = new Uint8Array(toUTF8Array(content));    content = new Zlib.Deflate(plain, {compressionType: Zlib.Deflate.CompressionType.DYNAMIC}).compress();                xhr.setRequestHeader('Content-Encoding', 'deflate');        }

The latest update adds support for the websocket protocol, and therefore the demo site has been changed. As an example of interaction over the websocket protocol, the JSON-RPC application level protocol (well, or some of its similarity  ::) - you can change it to your own) is used. Now I am working on adding the permessage-deflate extension (RFC 7692)

Cool. Apparently I already starred your repo, but this comment is here for an extra ⭐


--- Quote from: mr-highball on May 06, 2021, 06:09:43 am ---Cool. Apparently I already starred your repo, but this comment is here for an extra ⭐

--- End quote ---

Thank you for your support  :D

The structure of the project has been put in order. Added lpk file. The "permessage-deflate" extension for websocket has been fully implemented.


[0] Message Index

[*] Previous page

Go to full version