]> Nishi Git Mirror - libw3.git/commitdiff
redir support
authornishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Mon, 5 Feb 2024 00:31:12 +0000 (00:31 +0000)
committernishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Mon, 5 Feb 2024 00:31:12 +0000 (00:31 +0000)
git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@164 d27a3e52-49c5-7645-884c-6793ebffc270

Library/HTTP.c
W3Version.h.p

index 494412d1003e2cabeeb7bb4b9efe4b4f276656bf..0efb4e9144d582b4c658b7a6633b25b0c8aee664 100644 (file)
@@ -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);
index a2af16d8a6f9995ac2a58797542bb60839bfbdcd..2521604547a60ac461d3011f393716623081fde5 100644 (file)
@@ -6,7 +6,7 @@
 extern "C" {
 #endif
 
-#define LIBW3_VERSION "2.2J" \
+#define LIBW3_VERSION "2.2K" \
 SUFFIX
 
 #ifdef __cplusplus