ErlScriptAlias in INETS

Ulf Wiger <>
Fri Oct 5 19:42:20 CEST 2001


I don't know if it's just me, but when I specify an
ErlScriptAlias, I'd like it to look like this:

  ErlScriptAlias / ccviewer

allowing an URL like this:
 http://...ericsson.se:8800/ccviewer/fetch?...

which would end up calling ccviewer:fetch/2.

I found that this doesn't work without slightly tweaking
mod_esi.erl. The diff below did the trick.

The whole modified function looks like this:

load([$E,$r,$l,$S,$c,$r,$i,$p,$t,$A,$l,$i,$a,$s,$
|ErlScriptAlias],[]) ->
    case regexp:split(ErlScriptAlias," ") of
	{ok, ["/"|Modules]} ->
	    {ok, [], {erl_script_alias, {[], Modules}}};
	{ok, [ErlName|Modules]} ->
	    {ok, [], {erl_script_alias, {ErlName,Modules}}};
	{ok, _} ->
	    {error,?NICE(httpd_conf:clean(ErlScriptAlias)++
			 " is an invalid ErlScriptAlias")}
    end;



> diff mod_esi.erl
/OTP/LXA_11930_R7B01_9/lib/inets-2.5.6/src/mod_esi.erl 
260,261d259
<       {ok, ["/"|Modules]} ->
<           {ok, [], {erl_script_alias, {[], Modules}}};


Does anyone disagree with this change?

/Uffe
-- 
Ulf Wiger                                    tfn: +46  8 719 81 95
Senior System Architect                      mob: +46 70 519 81 95
Strategic Product & System Management    ATM Multiservice Networks
Data Backbone & Optical Services Division      Ericsson Telecom AB




More information about the erlang-questions mailing list