I found a way to edit the source code of nginx but in a very awful way :
1. find file :
ngx_http_gzip_static_module.c (ver 1.0.1, other version may be the same):
2 .in:
ngx_http_gzip_static_handler(ngx_http_request_t *r)
3 .found :
if (r->uri.data[r->uri.len - 1] == '/') {
return NGX_DECLINED;
}
4 .add :
if ( r->uri.data[r->uri.len - 1] == 'g' && r->uri.data[r->uri.len - 2] == 'n' && r->uri.data[r->uri.len - 3] == 'p' && r->uri.data[r->uri.len - 4] == '.') {
return NGX_DECLINED;
}
if ( r->uri.data[r->uri.len - 1] == 'g' && r->uri.data[r->uri.len - 2] == 'p' && r->uri.data[r->uri.len - 3] == 'j' && r->uri.data[r->uri.len - 4] == '.') {
return NGX_DECLINED;
}
if ( r->uri.data[r->uri.len - 1] == 'o' && r->uri.data[r->uri.len - 2] == 'c' && r->uri.data[r->uri.len - 3] == 'i' && r->uri.data[r->uri.len - 4] == '.') {
return NGX_DECLINED;
}
5. Recompile your source.
Anyone know C can edit it to be more professtinal because I don't know C :(
Edited 2 time(s). Last edit at 05/05/2011 12:27AM by newcomer11.