Skip to content

Commit 02fba0b

Browse files
committed
Removed unused SPDY code/files; SSL define fix
SPDY was deprecated in favour of HTTP/2 in all major browsers in 2021. I doubt a Blue server, a WebSocket-only HTTP server that only serves a single html page to browsers, will have use of HTTP/2 anyway, as it's a multiple-response-file system. Also moved the deps folder out of src folder in the vcxproj files, since it wasn't in there on filesystem. ENABLE_SSL was undefined on Unix config header; re-defined it and removed from vcxproj. There was one server.c section it was not define-guarding; added it there. Android and iOS do not come with system config files for openssl - so I will have to gather the correct openssl files and libraries for them. Fun.
1 parent 63e14ea commit 02fba0b

15 files changed

+100
-567
lines changed

Lacewing/src/unix/android config.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define ENABLE_CXX
2-
//#define ENABLE_SPDY
3-
//#define ENABLE_SSL
2+
#define ENABLE_SSL
43
#define ENABLE_THREADS
54

65
#define USE_EPOLL

Lacewing/src/unix/ios config.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define ENABLE_CXX
2-
//#define ENABLE_SPDY
3-
//#define ENABLE_SSL
2+
#define ENABLE_SSL
43
#define ENABLE_THREADS
54

65
//#define USE_EPOLL

Lacewing/src/unix/server.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,10 @@ void lw_server_delete (lw_server ctx)
171171

172172
lw_server_unhost (ctx);
173173

174+
#ifdef ENABLE_SSL
174175
if (ctx->ssl_context)
175176
SSL_CTX_free(ctx->ssl_context);
177+
#endif
176178

177179
free (ctx);
178180
}

Lacewing/src/unix/unix config.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define ENABLE_CXX
2-
//#define ENABLE_SPDY
3-
//#define ENABLE_SSL
2+
#define ENABLE_SSL
43
#define ENABLE_THREADS
54

65
#define USE_EPOLL

Lacewing/src/webserver/common.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,3 @@ struct _lwp_ws_client
189189
};
190190

191191
#include "http/http.h"
192-
193-
#ifdef ENABLE_SPDY
194-
#include "spdy/spdy.h"
195-
#endif
196-

Lacewing/src/webserver/http/http-client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ void client_respond (lwp_ws_client client, lw_ws_req request)
266266
lwp_ws_httpclient ctx = (lwp_ws_httpclient) client;
267267

268268
/* The request parameter is redundant here, because HTTP only ever has one
269-
* request object per client (unlike SPDY). Sanity check...
269+
* request object per client (unlike now-deprecated SPDY). Sanity check...
270270
*/
271271

272272
assert (request == ctx->request);

Lacewing/src/webserver/request.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,8 @@ void lwp_ws_req_respond (lw_ws_req ctx)
465465
{
466466
assert (!ctx->responded);
467467

468-
/* Respond may delete us w/ SPDY blah blah */
468+
/* James note: Respond may delete us w/ SPDY blah blah
469+
Phi note: SPDY was deprecated in favour of HTTP/2 in 2021, and so removed from liblacewing */
469470

470471
ctx->client->respond (ctx->client, ctx);
471472
}

Lacewing/src/webserver/spdy/spdy-client.c

Lines changed: 0 additions & 204 deletions
This file was deleted.

0 commit comments

Comments
 (0)