mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +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
6482c11f92
commit
c73e87e9c8
@ -1,5 +1,8 @@
|
|||||||
2009-02-27 Badlop <badlop@process-one.net>
|
2009-02-27 Badlop <badlop@process-one.net>
|
||||||
|
|
||||||
|
* src/web/ejabberd_http.erl: Added a workaround for inet:peername
|
||||||
|
returning 'ebadf'
|
||||||
|
|
||||||
* src/tls/tls_drv.c: S2S connection with STARTTLS fails to Gtalk
|
* src/tls/tls_drv.c: S2S connection with STARTTLS fails to Gtalk
|
||||||
and recent Openfire (thanks to Philipp Hancke)(EJAB-877)
|
and recent Openfire (thanks to Philipp Hancke)(EJAB-877)
|
||||||
|
|
||||||
|
@ -384,6 +384,13 @@ process_request(#state{request_method = Method,
|
|||||||
request_headers = RequestHeaders,
|
request_headers = RequestHeaders,
|
||||||
request_handlers = RequestHandlers} = State)
|
request_handlers = RequestHandlers} = State)
|
||||||
when (Method=:='POST' orelse Method=:='PUT') andalso is_integer(Len) ->
|
when (Method=:='POST' orelse Method=:='PUT') andalso is_integer(Len) ->
|
||||||
|
{ok, IP} =
|
||||||
|
case SockMod of
|
||||||
|
gen_tcp ->
|
||||||
|
inet:peername(Socket);
|
||||||
|
_ ->
|
||||||
|
SockMod:peername(Socket)
|
||||||
|
end,
|
||||||
case SockMod of
|
case SockMod of
|
||||||
gen_tcp ->
|
gen_tcp ->
|
||||||
inet:setopts(Socket, [{packet, 0}]);
|
inet:setopts(Socket, [{packet, 0}]);
|
||||||
@ -403,13 +410,6 @@ process_request(#state{request_method = Method,
|
|||||||
LQ ->
|
LQ ->
|
||||||
LQ
|
LQ
|
||||||
end,
|
end,
|
||||||
{ok, IP} =
|
|
||||||
case SockMod of
|
|
||||||
gen_tcp ->
|
|
||||||
inet:peername(Socket);
|
|
||||||
_ ->
|
|
||||||
SockMod:peername(Socket)
|
|
||||||
end,
|
|
||||||
Request = #request{method = Method,
|
Request = #request{method = Method,
|
||||||
path = LPath,
|
path = LPath,
|
||||||
q = LQuery,
|
q = LQuery,
|
||||||
|
Loading…
Reference in New Issue
Block a user