From: nishi Date: Mon, 5 Feb 2024 00:31:12 +0000 (+0000) Subject: redir support X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=3d5e86a0060066811add6457d5ef19d2d44e623f;p=libw3.git redir support git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@164 d27a3e52-49c5-7645-884c-6793ebffc270 --- diff --git a/Library/HTTP.c b/Library/HTTP.c index 494412d..0efb4e9 100644 --- a/Library/HTTP.c +++ b/Library/HTTP.c @@ -282,6 +282,11 @@ void __W3_HTTP_Request(struct W3* w3) { ); W3_Set_Path(w3, redir); } + void* funcptr = __W3_Get_Event(w3, "redirect"); + if(funcptr != NULL) { + void (*func)(struct W3*) = (void (*)(struct W3*))funcptr; + func(w3); + } W3_Send_Request(w3); } if(redir != NULL) free(redir); diff --git a/W3Version.h.p b/W3Version.h.p index a2af16d..2521604 100644 --- a/W3Version.h.p +++ b/W3Version.h.p @@ -6,7 +6,7 @@ extern "C" { #endif -#define LIBW3_VERSION "2.2J" \ +#define LIBW3_VERSION "2.2K" \ SUFFIX #ifdef __cplusplus