ErlScriptAlias in INETS

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

ErlScriptAlias in INETS

Ulf Wiger-4

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:

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:

|ErlScriptAlias],[]) ->
    case regexp:split(ErlScriptAlias," ") of
        {ok, ["/"|Modules]} ->
            {ok, [], {erl_script_alias, {[], Modules}}};
        {ok, [ErlName|Modules]} ->
            {ok, [], {erl_script_alias, {ErlName,Modules}}};
        {ok, _} ->
                         " is an invalid ErlScriptAlias")}

> diff mod_esi.erl
<       {ok, ["/"|Modules]} ->
<           {ok, [], {erl_script_alias, {[], Modules}}};

Does anyone disagree with this change?

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