Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Небольшой патч к userid f ilter
Добрый день.
У userid модуля есть один небольшой недостаток, его тяжело использовать в
своих модулях, ибо ctx и ngx_http_userid_filter_module не видны не откуда, что
не приятно.
Сей маленький патч выносит все что надо для работы с ним извне
diff -r 024591bb5748 src/http/modules/ngx_http_userid_filter_module.c
--- a/src/http/modules/ngx_http_userid_filter_module.c Thu Feb 21 19:50:29
2008 +0300
+++ b/src/http/modules/ngx_http_userid_filter_module.c Fri Feb 22 16:25:32
2008 +0300
@@ -7,7 +7,7 @@
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
-
+#include <ngx_http_userid_filter_module.h>
#define NGX_HTTP_USERID_OFF 0
#define NGX_HTTP_USERID_LOG 1
@@ -16,30 +16,6 @@
/* 31 Dec 2037 23:55:55 GMT */
#define NGX_HTTP_USERID_MAX_EXPIRES 2145916555
-
-
-typedef struct {
- ngx_uint_t enable;
-
- ngx_int_t service;
-
- ngx_str_t name;
- ngx_str_t domain;
- ngx_str_t path;
- ngx_str_t p3p;
-
- time_t expires;
-
- u_char mark;
-} ngx_http_userid_conf_t;
-
-
-typedef struct {
- uint32_t uid_got[4];
- uint32_t uid_set[4];
- ngx_str_t cookie;
-} ngx_http_userid_ctx_t;
-
static void ngx_http_userid_get_uid(ngx_http_request_t *r,
ngx_http_userid_ctx_t *ctx, ngx_http_userid_conf_t *conf);
diff -r 024591bb5748 src/http/modules/ngx_http_userid_filter_module.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/http/modules/ngx_http_userid_filter_module.h Fri Feb 22 16:25:32
2008 +0300
@@ -0,0 +1,29 @@
+#ifndef _NGX_HTTP_USERID_FILTER_H_INCLUDED_
+#define _NGX_HTTP_USERID_FILTER_H_INCLUDED_
+
+typedef struct {
+ ngx_uint_t enable;
+
+ ngx_int_t service;
+
+ ngx_str_t name;
+ ngx_str_t domain;
+ ngx_str_t path;
+ ngx_str_t p3p;
+
+ time_t expires;
+
+ u_char mark;
+} ngx_http_userid_conf_t;
+
+
+typedef struct {
+ uint32_t uid_got[4];
+ uint32_t uid_set[4];
+ ngx_str_t cookie;
+} ngx_http_userid_ctx_t;
+
+extern ngx_module_t ngx_http_userid_filter_module;
+
+
+#endif /* _NGX_HTTP_USERID_FILTER_H_INCLUDED_ */
--
| |*| | Kirill A. Korinskiy <catap@xxxxxxxx>
| | |*| proud (maniac)? (developer|hacker)
|*|*|*| http://catap.ru/ - +7 (916) 3-604-704 - xmpp:catap@xxxxxxxx
Attachment:
pgpWeKgxhYzKm.pgp
Description: PGP signature
|