klacke/yaws — Issue #89: Problems with arg_rewrite and revproxy.
Author: mdaguete
Created: 2012-02-16 18:17:00+00:00
State: open

Hi all,

I've implemented a rewriter where the url /yaws/icons/yaws_head.gif is rewrited to /revtest//icons/yaws_head.gif and then the following rule

{revproxy,[
{"/revtest",
#url{scheme="http",
host="213.180.77.67", %yaws.hyber.org ip
port=80}}
]}

proxy it to yaws.hyber.org.

Trying with a browser, and reloading it after a few hits the following error appears in logger:

crasher:
initial call: yaws_revproxy:ploop/5
pid: <0.2001.0>
registered_name: []
exception error: no function clause matching
yaws_revproxy:strip_prefix("yaws/icons/yaws_head.gif",
"revtest")
in function yaws_revproxy:rewrite_path/2
in call from yaws_revproxy:ploop/3
ancestors: [<0.1999.0>,<0.60.0>,yaws_server,yt_sup,<0.47.0>]
messages: []
links: [<0.1999.0>]
dictionary: [{sc,{sconf,8888,7,[],undefined,undefined,"/tmp",[],
{0,0,0,0},
"foobar",20499,undefined,
[{"/tmp",[]}],
10240,[],[],yaws_outmod,yaws_outmod,yaws_outmod,
yt_yaws_rewriter,yaws_log,[],undefined,
[yaws,php,cgi,fcgi],
[],
[{"/revtest",
{url,"http","213.180.77.67",80,[],[]}}],
[],[],undefined,undefined,
{cgi,"/usr/bin/php-cgi"},
undefined}},
{ssl,nossl},
{gc,{gconf,"/tmp/Yaws_test/deps/yaws",true,
100,".",
["/tmp/Yaws_test/deps/yaws/examples/ebin"],
[],30000,nolimit,400,1000000,8000,nolimit,[],
10240,[],10000000,30,
["/tmp/Yaws_test/deps/yaws/examples/include"],
"/usr/bin/php-cgi",[],"Yaws 1.92","embedded",
false,[],yaws_session_server,8}},
{request_start_time,{1329,416081,429202}}]
trap_exit: false
status: running
heap_size: 4181
stack_size: 24
reductions: 5230
neighbours:

Any idea ?

Regards.