diff options
| author | John Turner <jturner.usa@gmail.com> | 2026-03-05 00:49:17 -0500 |
|---|---|---|
| committer | John Turner <jturner.usa@gmail.com> | 2026-03-05 00:49:17 -0500 |
| commit | d7a1ffd41201fdbac858156a8200a8ec5a2dbb76 (patch) | |
| tree | 5c1eace9a07f8615fc6856e461b3964ded7ec30a /src/request.rs | |
| parent | a933ac4a6d99deb6859a4c72761572ef55764afe (diff) | |
| download | httpd-d7a1ffd41201fdbac858156a8200a8ec5a2dbb76.tar.gz | |
return BString instead of Vec, otherwise it creates a table and not a buffer
Diffstat (limited to 'src/request.rs')
| -rw-r--r-- | src/request.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/request.rs b/src/request.rs index 1a0611f..99b7482 100644 --- a/src/request.rs +++ b/src/request.rs @@ -96,7 +96,9 @@ impl UserData for Request { fn add_fields<F: mlua::UserDataFields<Self>>(fields: &mut F) { fields.add_field_method_get("method", |_, this| Ok(this.method().to_string())); - fields.add_field_method_get("path", |_, this| Ok(this.path().0.clone())); + fields.add_field_method_get("path", |_, this| { + Ok(mlua::BString::new(this.path().inner().clone())) + }); fields.add_field_method_get("headers", |lua, this| { let table = lua.create_table()?; |
