mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-02 16:37:52 +01:00
Merge fix from trunk r1910
* src/web/ejabberd_http.erl: Added a workaround for inet:peername returning 'ebadf' SVN Revision: 1928
This commit is contained in:
parent
8be6b8df76
commit
06abf6331b
@ -1,5 +1,8 @@
|
||||
2009-02-27 Badlop <badlop@process-one.net>
|
||||
|
||||
* src/web/ejabberd_http.erl: Added a workaround for inet:peername
|
||||
returning 'ebadf'
|
||||
|
||||
* src/cyrsasl_digest.erl: Unquote backslash in DIGEST-MD5 quoted
|
||||
strings (EJAB-304)
|
||||
|
||||
|
@ -328,6 +328,13 @@ process_request(#state{request_method = 'POST',
|
||||
socket = Socket,
|
||||
request_handlers = RequestHandlers} = State)
|
||||
when is_integer(Len) ->
|
||||
{ok, IP} =
|
||||
case SockMod of
|
||||
gen_tcp ->
|
||||
inet:peername(Socket);
|
||||
_ ->
|
||||
SockMod:peername(Socket)
|
||||
end,
|
||||
case SockMod of
|
||||
gen_tcp ->
|
||||
inet:setopts(Socket, [{packet, 0}]);
|
||||
@ -347,13 +354,6 @@ process_request(#state{request_method = 'POST',
|
||||
LQ ->
|
||||
LQ
|
||||
end,
|
||||
{ok, IP} =
|
||||
case SockMod of
|
||||
gen_tcp ->
|
||||
inet:peername(Socket);
|
||||
_ ->
|
||||
SockMod:peername(Socket)
|
||||
end,
|
||||
Request = #request{method = 'POST',
|
||||
path = LPath,
|
||||
q = LQuery,
|
||||
|
Loading…
Reference in New Issue
Block a user