1 Jun 2010 10:03
фильтр дублирует ответы
Привет.
Написал простой фильтр для nginx.
nginx фронтенд(localhost:8000). apache бэкенд(localhost:80).
Код фильтра.
[code]
#include "pg.h"
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
static ngx_int_t ngx_http_pg_filter_init(ngx_conf_t *cf);
static ngx_int_t ngx_http_pg_header_filter(ngx_http_request_t *r);
static ngx_int_t ngx_http_pg_body_filter(ngx_http_request_t *r, ngx_chain_t *in);
static ngx_http_module_t ngx_http_pg_module_ctx = {
NULL, /* preconfiguration */
ngx_http_pg_filter_init, /* postconfiguration */
NULL, /* create main configuration */
NULL, /* init main configuration */
NULL, /* create server configuration */
NULL, /* merge server configuration */
NULL, /* create location configuration */
NULL /* merge location configuration */
};
(Continue reading)
Posted at Nginx Forum:
RSS Feed