Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tests/http_csrf_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "burrow/net/http.h"
#include "burrow/net/http/httptest.h"
#include "burrow/net/url.h"
#include "burrow/netpoll.h"
#include "burrow/proc.h"
#include "burrow/slice.h"
#include "burrow/strings.h"
Expand All @@ -28,6 +29,18 @@

#define S BURROW_S

#if defined(BURROW_NETPOLL_READINESS) && !defined(BURROW_OS_WASI)
#define HAVE_TCP 1
#endif

static void need_tcp(TestingT *t) {
#if !defined(HAVE_TCP)
testing_t_skip_v(t, "TCP here needs the readiness poll FD");
#else
(void)t;
#endif
}

static Str cs(const char *s) {
return s == NULL ? BURROW_STR_EMPTY : str_from_cstr(s);
}
Expand Down Expand Up @@ -544,6 +557,7 @@ static void server_case(void *env, TestingT *t) {
}

static void TestCrossOriginProtectionServer(TestingT *t) {
need_tcp(t);
HttpCrossOriginProtection *protection =
http_new_cross_origin_protection(heap_allocator());
(void)http_cross_origin_protection_add_trusted_origin(protection,
Expand Down
Loading