Skip to content

Commit 28d8e86

Browse files
committed
Bump ngx-rust
1 parent eba51b2 commit 28d8e86

File tree

3 files changed

+51
-60
lines changed

3 files changed

+51
-60
lines changed

Cargo.lock

Lines changed: 45 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ crate-type = ["cdylib"]
1515
path = "src/robot.rs"
1616

1717
[dependencies]
18-
ngx = { git = "https://github.com/glyn/ngx-rust",tag="pre-0.5.0"}
18+
cc = "1.2.0"
19+
ngx = { git = "https://github.com/glyn/ngx-rust", tag = "pre-0.5.0-2"}
1920
robotstxt = "0.3.0"
2021
tokio = { version = "1.33.0", features = ["full"] }

src/robot.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ use ngx::ffi::{
33
nginx_version, ngx_array_push, ngx_command_t, ngx_conf_t, ngx_http_core_module, ngx_http_handler_pt,
44
ngx_http_module_t, ngx_http_phases_NGX_HTTP_ACCESS_PHASE, ngx_http_request_t, ngx_int_t, ngx_module_t, ngx_str_t,
55
ngx_uint_t, NGX_CONF_TAKE1, NGX_HTTP_MAIN_CONF, NGX_HTTP_SRV_CONF, NGX_HTTP_LOC_CONF, NGX_HTTP_MODULE,
6-
NGX_RS_HTTP_LOC_CONF_OFFSET, NGX_RS_MODULE_SIGNATURE,
6+
NGX_HTTP_LOC_CONF_OFFSET, NGX_RS_MODULE_SIGNATURE,
77
};
88
use ngx::http::MergeConfigError;
99
use ngx::{core, core::Status, http, http::HTTPModule};
10-
use ngx::{http_request_handler, ngx_log_debug_http, ngx_modules, ngx_null_command, ngx_string};
10+
use ngx::{http_request_handler, ngx_log_debug_http, ngx_modules, ngx_string};
1111
use robotstxt::DefaultMatcher;
1212
use std::fs;
1313
use std::os::raw::{c_char, c_void};
@@ -53,11 +53,11 @@ static mut ngx_http_robots_commands: [ngx_command_t; 2] = [
5353
| NGX_HTTP_LOC_CONF
5454
| NGX_CONF_TAKE1 ) as ngx_uint_t,
5555
set: Some(ngx_http_robots_commands_set_robots_txt_path),
56-
conf: NGX_RS_HTTP_LOC_CONF_OFFSET,
56+
conf: NGX_HTTP_LOC_CONF_OFFSET,
5757
offset: 0,
5858
post: std::ptr::null_mut(),
5959
},
60-
ngx_null_command!(),
60+
ngx_command_t::empty(),
6161
];
6262

6363
#[no_mangle]

0 commit comments

Comments
 (0)