Index: ejabberd_http.hrl =================================================================== --- ejabberd_http.hrl (revisione 1275) +++ ejabberd_http.hrl (copia locale) @@ -26,5 +26,6 @@ auth, lang = "", data = "", + cookie = "", ip }). Index: ejabberd_http.erl =================================================================== --- ejabberd_http.erl (revisione 1275) +++ ejabberd_http.erl (copia locale) @@ -45,6 +45,7 @@ request_version, request_path, request_auth, + request_cookie, request_keepalive, request_content_length, request_lang = "en", @@ -209,6 +210,8 @@ State#state{request_keepalive = KeepAlive1}; {ok, {http_header, _, 'Authorization', _, Auth}} -> State#state{request_auth = parse_auth(Auth)}; + {ok, {http_header, _, 'Cookie', _, Cookie}} -> + State#state{request_cookie = Cookie}; {ok, {http_header, _, 'Content-Length', _, SLen}} -> case catch list_to_integer(SLen) of Len when is_integer(Len) -> @@ -275,6 +278,7 @@ request_path = {abs_path, Path}, request_auth = Auth, request_lang = Lang, + request_cookie = Cookie, request_handlers = RequestHandlers, sockmod = SockMod, socket = Socket} = State) -> @@ -301,6 +305,7 @@ q = LQuery, auth = Auth, lang = Lang, + cookie = Cookie, ip=IP}, %% XXX bard: This previously passed control to %% ejabberd_web:process_get, now passes it to a local @@ -324,6 +329,7 @@ request_auth = Auth, request_content_length = Len, request_lang = Lang, + request_cookie = Cookie, sockmod = SockMod, socket = Socket, request_handlers = RequestHandlers} = State) @@ -351,6 +357,7 @@ path = LPath, q = LQuery, auth = Auth, + cookie = Cookie, data = Data, lang = Lang}, case process(RequestHandlers, Request) of