curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

Re: Libcurl and WebSockets

From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 7 Jan 2025 16:32:02 +0100 (CET)

On Tue, 7 Jan 2025, Gavin D. Howard via curl-library wrote:

> I was wondering if the server portion of WebSockets could be implemented
> minus the upgrade. I'd love to do it myself; would it be accepted if I did
> it up to the standards of the Curl project?

I can't see how that is libcurl's business. My mantra for curl has always been
"client side only", so adding code that is exclusively for server-side seems
to land on the wrong side of the fence.

But I'll willingly listen to what others say.

> I've read the RFCs and just for HTTP 1.1, it seems simple enough to
> implement it if I break Postel's law and essentially only accept
> well-formatted HTTP requests, or requests as generated by browsers and
> libcurl. Would it be simple enough to do myself? I really don't want to
> pull in a full server library.

Implementing HTTP/1 proper is not easy. It is easy to get to the 90-95% mark.
The remaining part can take a life-time. But yes, by limiting what you want to
support and ignoring the rest, it can probably be done in a reasonable amount
of effort. I'm guessing.

-- 
  / daniel.haxx.se || https://rock-solid.curl.dev
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2025-01-07