25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

* src/web/ejabberd_http.erl: Bugfix

SVN Revision: 269
This commit is contained in:
Alexey Shchepin 2004-09-29 14:09:02 +00:00
parent f17f0dac12
commit 0e2af703bd
2 changed files with 50 additions and 39 deletions

View File

@ -1,3 +1,7 @@
2004-09-29 Alexey Shchepin <alexey@sevcom.net>
* src/web/ejabberd_http.erl: Bugfix
2004-09-27 Alexey Shchepin <alexey@sevcom.net>
* src/Makefile.in: Updated (thanks to Badlop)

View File

@ -200,7 +200,10 @@ process_request(#state{request_method = 'GET',
{'EXIT', _} ->
process_request(false);
{NPath, Query} ->
LQuery = parse_urlencoded(Query),
case (catch parse_urlencoded(Query)) of
{'EXIT', _Reason} ->
process_request(false);
LQuery ->
LPath = string:tokens(NPath, "/"),
Request = #request{method = 'GET',
path = LPath,
@ -221,6 +224,7 @@ process_request(#state{request_method = 'GET',
make_text_output(Status, Headers, Text)
end
end
end
end;
process_request(#state{request_method = 'POST',
@ -265,7 +269,10 @@ process_request(#state{request_method = 'POST',
process_request(false);
{NPath, Query} ->
LPath = string:tokens(NPath, "/"),
LQuery = parse_urlencoded(Data),
case (catch parse_urlencoded(Data)) of
{'EXIT', _Reason} ->
process_request(false);
LQuery ->
Request = #request{method = 'POST',
path = LPath,
q = LQuery,
@ -281,14 +288,14 @@ process_request(#state{request_method = 'POST',
make_xhtml_output(Status, Headers, El);
Text when is_list(Text) ->
make_text_output(200, [], Text);
{Status, Headers, Text} when
is_list(Text) ->
{Status, Headers, Text} when is_list(Text) ->
make_text_output(Status, Headers, Text)
end
end
end
end;
process_request(State) ->
process_request(_) ->
make_xhtml_output(
400,
[],