Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- map http://example-cdn.com http://example.com:8888 \
- @plugin=cachekey.so \
- @pparam=--capture-prefix=/(.*)-cdn.com.*$/$1/ \
- $ cat http.txt
- GET /path/file?a=1&geo=a,b,c HTTP/1.1
- Host: example-cdn.com
- $ nc 127.0.0.1 8080 < http.txt
- HTTP/1.1 200 OK
- Server: ATS/9.0.0
- Date: Tue, 21 Aug 2018 21:40:44 GMT
- Content-type: text/html
- Content-Length: 3
- Cache-Control: max-age=10, public
- Age: 0
- Connection: keep-alive
- [Aug 21 14:40:40.903] {0x7fffb57a4380} DIAG: (cachekey) cachekey/configs.cc:419:init() processing --capture-prefix=/(.*)-cdn.com.*$/$1/
- [Aug 21 14:40:40.903] {0x7fffb57a4380} DIAG: (cachekey) cachekey/pattern.cc:335:compile() compiling pattern:'(.*)-cdn.com.*$', replace: true, replacement:'$1'
- [Aug 21 14:40:40.903] {0x7fffb57a4380} DIAG: (cachekey) cachekey/plugin.cc:153:TSRemapNewInstance() remap plugin initialized
- [Aug 21 14:40:44.450] {0xb000c000} DIAG: (cachekey) cachekey/cachekey.cc:208:CacheKey() setting cache key from a remap plugin
- [Aug 21 14:40:44.450] {0xb000c000} DIAG: (cachekey) cachekey/cachekey.cc:219:CacheKey() using remap uri 'http://example-cdn.com/path/file?a=1&geo=a,b,c'
- [Aug 21 14:40:44.450] {0xb000c000} DIAG: (cachekey) cachekey/pattern.cc:277:replace() replacing:'$1' in pattern:'(.*)-cdn.com.*$', subject:'example-cdn.com:80'
- [Aug 21 14:40:44.450] {0xb000c000} DIAG: (cachekey) cachekey/pattern.cc:309:replace() replacing '$1' with 'example'
- [Aug 21 14:40:44.450] {0xb000c000} DIAG: (cachekey) cachekey/pattern.cc:319:replace() replacing '$1' resulted in 'example'
- [Aug 21 14:40:44.450] {0xb000c000} DIAG: (cachekey) cachekey/cachekey.cc:358:appendPrefix() added host:port capture prefix, key: '/example'
- [Aug 21 14:40:44.450] {0xb000c000} DIAG: (cachekey) cachekey/cachekey.cc:704:finalize() finalizing cache key '/example/path/file?a=1&geo=a,b,c' from a remap plugin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement