GitHub user abbycin opened an issue:
https://github.com/apache/trafficserver/issues/1251
remap plugin won't work
### Brief
calling the following functions before **TS_HTTP_POST_REMAP_HOOK** cause
rule in remap plugin don't work.
```c++
TSUrlPortSet();
TSUlPathSet();
TSUrlHostSet();
TSUrlSchemeSet();
```
here is one line in `remap.config`
```
map http://192.168.16.174/ http://192.168.16.174/ @plugin=libtslua.so
@pparam=/usr/local/etc/trafficserver/sta_modifyurl.lua
```
-----
### Detail
here is code fragment from `cacheurl.cc`, the left side only `#if 1` and
`#endif` is new code and the right side is a new header file to modify client
request url.
the hook point is **TS_HTTP_READ_REQUEST_HDR_HOOK**

the code in above picture will cause the `libtslua.so` won't work, even not
enter in any of the following functions in `ts_lua.c` (the ts-lua plugin source
is [here](https://github.com/portl4t/ts-lua))
```c++
TSReturnCode
TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size);
TSReturnCode
TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int
errbuf_size);
void
TSRemapDeleteInstance(void *ih);
TSRemapStatus
TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo *rri);
static int
globalHookHandler(TSCont contp, TSEvent event ATS_UNUSED, void *edata);
```
-----
So, what's wrong after calling those **Set** functions, and how to solve
this problem ?
Thank you!
----
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---