Commit Graph

24 Commits

Author SHA1 Message Date
Karl Seguin
a3939d9a66 Supports brotli compression
Adds bortli as a submodules, and compiles the decoder, making it available to
libcurl.

Some websites appear to sent brotli encoded responses even though we don't
advertise support for it (e.g. https://movie.douban.com).
2025-10-06 12:30:06 +08:00
Pierre Tachoire
0ab6b15292 submodule: use GH fork of netsurf buildsystem 2025-09-15 08:18:22 +02:00
Karl Seguin
b0fe5d60ab Initial work on integrating libcurl and making all http nonblocking 2025-08-11 21:36:56 +08:00
Karl Seguin
b8d7744563 replace zig-js-runtime 2025-04-15 15:18:04 +08:00
Karl Seguin
e1a85d97e3 Zig 0.14 compatibility 2025-03-23 19:01:40 +08:00
Karl Seguin
21c9dde858 Zig 0.14 compatibility 2025-03-19 16:28:15 +01:00
Karl Seguin
94be7a0e79 Make TCP server websocket-aware
Adding HTTP & websocket awareness to the TCP server.

HTTP server handles `GET /json/version` and websocket upgrade requests.

Conceptually, websocket handling is the same code as before, but receiving
data will parse the websocket frames and writing data will wrap it in
a websocket frame.

The previous `Ctx` was split into a `Server` and a `Client`. This was
largely done to make it easy to write unit tests, since the `Client` is
a generic, all its dependencies (i.e. the server) can be mocked out. This
also makes it a bit nicer to know if there is or isn't a client (via the
server's client optional).

Added a MemoryPool for the Send object (I thought that was a nice touch!)

Removed MacOS hack on accept/conn completion usage.

Known issues:
- When framing an outgoing message, the entire message has to be duped. This
is no worse than how it was before, but it should be possible to eliminate
this in the future. Probably not part of this PR.

- Websocket parsing will reject continuation frames. I don't know of a single
client that will send a fragmented message (websocket has its own
message fragmentation), but we should probably still support this just in
case.

- I don't think the receive, timeout and close completions can safely be
re-used like we're doing. I believe they need to be associated with a specific
client socket.

- A new connection creates a new browser session. I think this is right (??),
but for the very first, we're throwing out a perfectly usable session. I'm
thinking this might be a change to how Browser/Sessions work.

- zig build test won't compile. This branch reproduces the issue with none
of these changes:
https://github.com/karlseguin/browser/tree/broken_test_build

(or, as a diff to main):
https://github.com/lightpanda-io/browser/compare/main...karlseguin:broken_test_build
2025-02-13 08:51:19 +08:00
Karl Seguin
76a2520e56 Use https:// instead of git@ for submodules
Allows easily building the project, following the steps in readme, without
a github account or having some special git configuration.
2025-01-30 11:56:37 +08:00
Francis Bouvier
325ecedf0b websocket: first implementation
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2024-11-27 21:24:09 +01:00
Francis Bouvier
de286dd78e async: use zig-async-io
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2024-11-21 16:42:48 +01:00
Pierre Tachoire
6a4d64ed00 use tls.zig with async client
see https://github.com/ziglang/zig/compare/master...ianic:zig:tls23 for
http.std.Client integration
2024-07-19 14:39:50 +02:00
Francis Bouvier
986e69f45d Update dependancy jsruntime-lib -> zig-js-runtime
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2024-05-14 11:35:23 +02:00
Pierre Tachoire
59b2954ff4 deps: add mimalloc dependency 2024-04-19 11:46:41 +02:00
Pierre Tachoire
5e9d31b053 deps: use our fork for all netsurf deps 2024-04-19 11:46:41 +02:00
Pierre Tachoire
52d3f3e966 deps: remove lexbor 2024-03-28 11:13:17 +01:00
Pierre Tachoire
c8704736dc wpt: add git submodules into tests/wpt 2024-01-03 10:19:11 +01:00
Pierre Tachoire
05b171f86e modules: change organization pathname 2023-12-13 10:02:06 +01:00
Pierre Tachoire
18b4c2c002 vendor: use libdom fork 2023-10-19 15:14:19 +02:00
Francis Bouvier
6786c8a3d8 Move to organization "Browsercore"
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-09-26 12:29:44 +02:00
Francis Bouvier
97348cef5c Add netsurf submodules
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-09-06 17:51:43 +02:00
Pierre Tachoire
3bfefcb047 vendor: seperate lexbor source from build
* add `vendor/lexbor-src` submodule
* build lexbor static lib into `vendor/lexbor`
2023-09-01 16:00:27 +02:00
Pierre Tachoire
8d82bf0434 vendor: remove vendor/lexbor submodule 2023-09-01 16:00:27 +02:00
Pierre Tachoire
2df7a542e7 vendor: add jsruntime-lib submodule 2023-09-01 16:00:26 +02:00
Pierre Tachoire
85c5662dbc vendor: add lexbor deps submodule 2023-09-01 16:00:25 +02:00