diff --git a/uppsrc/Core/Http.cpp b/uppsrc/Core/Http.cpp index 2bdb11ff6..af820985d 100644 --- a/uppsrc/Core/Http.cpp +++ b/uppsrc/Core/Http.cpp @@ -37,6 +37,7 @@ void HttpRequest::Init() chunk = 4096; timeout = 120000; ssl = false; + cookies = false; } HttpRequest::HttpRequest() @@ -658,6 +659,8 @@ void HttpRequest::Finish() #endif } Close(); + if(cookies) + CopyCookies(); if(status_code == 401 && !IsNull(username)) { String authenticate = header["www-authenticate"]; if(authenticate.GetCount() && redirect_count++ < max_redirects) { diff --git a/uppsrc/Core/Inet.h b/uppsrc/Core/Inet.h index 0fa1f8a30..76332793d 100644 --- a/uppsrc/Core/Inet.h +++ b/uppsrc/Core/Inet.h @@ -310,6 +310,7 @@ class HttpRequest : public TcpSocket { String digest; String request_headers; String postdata; + bool cookies; String protocol; int status_code; @@ -389,6 +390,8 @@ public: HttpRequest& AddHeaders(const String& h) { request_headers.Cat(h); return *this; } HttpRequest& Header(const char *id, const String& data); HttpRequest& Cookie(const String& cookie) { return Header("Cookie", cookie); } + + HttpRequest& Cookies(bool b = true) { cookies = b; } HttpRequest& StdHeaders(bool sh) { std_headers = sh; return *this; } HttpRequest& NoStdHeaders() { return StdHeaders(false); } diff --git a/uppsrc/CtrlCore/X11App.cpp b/uppsrc/CtrlCore/X11App.cpp index c2a84a112..90a3c63ea 100644 --- a/uppsrc/CtrlCore/X11App.cpp +++ b/uppsrc/CtrlCore/X11App.cpp @@ -522,6 +522,15 @@ int Ctrl::GetKbdSpeed() return 25; } + +#ifdef _DEBUG +void _DBG_Ungrab(void) { + XUngrabPointer(Xdisplay, CurrentTime); + XUngrabKeyboard(Xdisplay, CurrentTime); + XFlush(Xdisplay); +} +#endif + END_UPP_NAMESPACE #endif