4
%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
4
%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
8
8
%% compliance with the License. You should have received a copy of the
9
9
%% Erlang Public License along with this software. If not, it can be
10
10
%% retrieved online at http://www.erlang.org/.
12
12
%% Software distributed under the License is distributed on an "AS IS"
13
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
14
%% the License for the specific language governing rights and limitations
15
15
%% under the License.
249
249
{proceed, [{status,{400, none, BadRequest}} | ModData#mod.data]}
252
erl(#mod{method = "POST", entity_body = Body} = ModData, ESIBody, Modules) ->
252
erl(#mod{request_uri = ReqUri,
254
http_version = Version,
255
data = Data}, _ESIBody, _Modules) ->
256
{proceed, [{status,{501,{"PUT", ReqUri, Version},
257
?NICE("Erl mechanism doesn't support method PUT")}}|
260
erl(#mod{request_uri = ReqUri,
262
http_version = Version,
263
data = Data}, _ESIBody, _Modules) ->
264
{proceed,[{status,{501,{"DELETE", ReqUri, Version},
265
?NICE("Erl mechanism doesn't support method DELETE")}}|
268
erl(#mod{method = "POST",
269
entity_body = Body} = ModData, ESIBody, Modules) ->
253
270
case httpd_util:split(ESIBody,":|%3A|/",2) of
254
271
{ok,[ModuleName, Function]} ->
255
272
generate_webpage(ModData, ESIBody, Modules,
445
462
%%------------------------ Eval mechanism --------------------------------
447
eval(#mod{request_uri = ReqUri, method = "POST",
448
http_version = Version, data = Data}, _ESIBody, _Modules) ->
464
eval(#mod{request_uri = ReqUri,
466
http_version = Version,
467
data = Data}, _ESIBody, _Modules) ->
468
{proceed,[{status,{501,{"PUT", ReqUri, Version},
469
?NICE("Eval mechanism doesn't support method PUT")}}|
472
eval(#mod{request_uri = ReqUri,
474
http_version = Version,
475
data = Data}, _ESIBody, _Modules) ->
476
{proceed,[{status,{501,{"DELETE", ReqUri, Version},
477
?NICE("Eval mechanism doesn't support method DELETE")}}|
480
eval(#mod{request_uri = ReqUri,
482
http_version = Version,
483
data = Data}, _ESIBody, _Modules) ->
449
484
{proceed,[{status,{501,{"POST", ReqUri, Version},
450
485
?NICE("Eval mechanism doesn't support method POST")}}|