[Git][debian-gis-team/wxcurl][master] 2 commits: debian: split too large patch.

Alec leamas gitlab at salsa.debian.org
Sun Sep 30 20:53:39 BST 2018


Alec leamas pushed to branch master at Debian GIS Project / wxcurl


Commits:
54f1cc27 by Alec Leamas at 2018-09-30T19:09:50Z
debian: split too large patch.

- - - - -
272b3d2f by Alec Leamas at 2018-09-30T19:52:01Z
debian: Document that packaging is aborted.

- - - - -


15 changed files:

- debian/DRAFT
- debian/README.source
- debian/patches/0003-Correct-an-occasional-ASSERT-for-invalid-wxTimeSpan.patch
- debian/patches/0005-delete-m_pCurl-in-wxCurlBaseThread-DTOR-not-in-OnExi.patch
- debian/patches/0012-Threads-corner-cases.patch → debian/patches/0011-Threads-corner-cases.patch
- − debian/patches/0011-base-use-wxstring-return-values-instead-of-std-strin.patch
- debian/patches/0013-Makefile.in-Add-target-writing-library-l-definition.patch → debian/patches/0012-Makefile.in-Add-target-writing-library-l-definition.patch
- + debian/patches/0013-base-Add-SetAbort-GetAbort-handling-hung-transfers.patch
- + debian/patches/0014-base-Add-dummy-GetNAText.patch
- + debian/patches/0015-wxcurl-Don-t-take-length-on-null-pointers.patch
- + debian/patches/0016-Add-missing-va_end.patch
- + debian/patches/0017-base-Fix-constructor-initializers.patch
- + debian/patches/0018-base-Update-standard-curl-options.patch
- + debian/patches/0019-base-Use-std-string-instead-of-wxstring.patch
- debian/patches/series


Changes:

=====================================
debian/DRAFT
=====================================
@@ -1 +1,17 @@
-This is a draft until reviewed.
+This packaging is a draft initiated as a dependency of opencpn [1]. After 
+a deeper look into the situation it has been decided to use the bundled
+code in opencpn instead of this package.
+
+The main problem is that the bundled code has revised the API to fix a 
+windows build problem. This change is the last patch in the debian patch
+series. The rest of the patches are bugfixes and expanded API.
+
+From a Debian perspective here are also problems with an abandoned upstream 
+and a bakefiles [2] dependency which isn't packaged.
+
+The debian patch series has split the original patch when importing wxcurl
+into opencpn into several smaller steps.
+
+
+[1] https://opencpn.org
+[2] https://bakefile.org/


=====================================
debian/README.source
=====================================
@@ -1,6 +1,8 @@
 wxcurl for Debian -- rebuilding and downloading tarball
 -------------------------------------------------------
 
+This is an abandoned attempt to package wxcurl - see d/DRAFT.
+
 The original sources are based on the bakefiles build system which is
 not available in Debian. Because of this just the end result in the
 form of configure, config.guess etc. has been updated. On a system


=====================================
debian/patches/0003-Correct-an-occasional-ASSERT-for-invalid-wxTimeSpan.patch
=====================================
@@ -1,5 +1,5 @@
-From: Alec Leamas <leamas.alec at nowhere.net>
-Date: Mon, 10 Sep 2018 16:28:48 -0400
+From: David Register <bdbcat at users.sourceforge.net>
+Date: Sun, 20 Sep 2015 22:42:56 -0400
 Subject: Correct an occasional ASSERT for invalid wxTimeSpan
 
 ---


=====================================
debian/patches/0005-delete-m_pCurl-in-wxCurlBaseThread-DTOR-not-in-OnExi.patch
=====================================
@@ -1,5 +1,5 @@
-From: Alec Leamas <leamas at nowhere.net>
-Date: Tue, 21 Aug 2018 17:44:33 -0400
+From: did-g <did-g at users.noreply.github.com>
+Date: Tue, 24 Nov 2015 05:36:06 +0100
 Subject: delete m_pCurl in wxCurlBaseThread DTOR not in OnExit
 
 The thread method can be called before all events are processed.


=====================================
debian/patches/0012-Threads-corner-cases.patch → debian/patches/0011-Threads-corner-cases.patch
=====================================


=====================================
debian/patches/0011-base-use-wxstring-return-values-instead-of-std-strin.patch deleted
=====================================
@@ -1,1358 +0,0 @@
-From: Alec Leamas <leamas.alec at nowhere.net>
-Date: Tue, 11 Sep 2018 03:19:08 -0400
-Subject: base: use wxstring return values instead of std::string,
- new accessors
-
-For consistency, return wxstring values instead of std::string.
-Add new access methods GetErrorString() and GetResponseBody().
----
- include/wx/curl/base.h | 505 ++++++++++++++++++++++----------------------
- src/base.cpp           | 553 ++++++++++++++++++++++++++-----------------------
- 2 files changed, 560 insertions(+), 498 deletions(-)
-
-diff --git a/include/wx/curl/base.h b/include/wx/curl/base.h
-index 1c0120c..3a19550 100644
---- a/include/wx/curl/base.h
-+++ b/include/wx/curl/base.h
-@@ -15,13 +15,14 @@
- #ifndef _WXCURLBASE_H__INCLUDED_
- #define _WXCURLBASE_H__INCLUDED_
- 
--#ifdef WXMAKINGDLL_WXCURL
--    #define WXDLLIMPEXP_CURL WXEXPORT
--#elif defined(WXUSINGDLL)
--    #define WXDLLIMPEXP_CURL WXIMPORT
--#else // not making nor using DLL
--    #define WXDLLIMPEXP_CURL
--
-+#ifdef WXMAKINGDLL_WXCURL
-+    #define WXDLLIMPEXP_CURL WXEXPORT
-+#elif defined(WXUSINGDLL)
-+//    #define WXDLLIMPEXP_CURL WXIMPORT
-+    #define WXDLLIMPEXP_CURL
-+#else // not making nor using DLL
-+    #define WXDLLIMPEXP_CURL
-+
-     // if we do not define this symbol, cURL header will assume
-     // a DLL build is being done and will export symbols:
-     #ifndef CURL_STATICLIB
-@@ -60,33 +61,32 @@ class WXDLLIMPEXP_CURL wxCurlBase;
- 
- //! Private internal class used as base class for wxCurlDownloadEvent and wxCurlUploadEvent.
- class WXDLLIMPEXP_CURL wxCurlProgressBaseEvent : public wxEvent
--{
--public:
--    wxCurlProgressBaseEvent(int id, wxEventType type,
--                        wxCurlBase *p = NULL, const wxString &url = wxEmptyString)
--        : wxEvent(id, type) { m_pCURL = p; m_szURL = url; m_dt = wxDateTime::Now(); }
--
--
-+{
-+public:
-+    wxCurlProgressBaseEvent(int id, wxEventType type,
-+                        wxCurlBase *p = NULL, const std::string &url = "")
-+        : wxEvent(id, type) { m_pCURL = p; m_szURL = url; m_dt = wxDateTime::Now(); }
-+
-+
- public:     // misc getters
- 
-     //! Returns the curl session which generated this event.
-     wxCurlBase *GetCurlSession() const { return m_pCURL; }
- 
-     //! Returns the date & time at which this event was generated.
--    wxDateTime GetDateTime() const { return m_dt; }
--
--    //! Returns a number in [0;100] range indicating how much has been transferred so far.
--    double GetPercent() const 
--        { return GetTotalBytes() == 0 ? 0 : (100.0 * (GetTransferredBytes()/GetTotalBytes())); }
--
--    //! Returns the current transfer speed in bytes/second.
--    virtual double GetSpeed() const
--        { return GetTransferredBytes()/GetElapsedTime().GetSeconds().ToDouble(); }
--
--
--public:     // wxTimeSpan getters
--
--    //! Returns the time elapsed since the beginning of the download up
-+    wxDateTime GetDateTime() const { return m_dt; }
-+
-+    //! Returns a number in [0;100] range indicating how much has been transferred so far.
-+    double GetPercent() const
-+        { return GetTotalBytes() == 0 ? 0 : (100.0 * (GetTransferredBytes()/GetTotalBytes())); }
-+
-+    //! Returns the current transfer speed in bytes/second.
-+    virtual double GetSpeed() const
-+        { return GetTransferredBytes()/GetElapsedTime().GetSeconds().ToDouble(); }
-+
-+public:     // wxTimeSpan getters
-+
-+    //! Returns the time elapsed since the beginning of the download up
-     //! to the time this function is called.
-     virtual wxTimeSpan GetElapsedTime() const;
- 
-@@ -97,61 +97,74 @@ public:     // wxTimeSpan getters
-     virtual wxTimeSpan GetEstimatedRemainingTime() const;
- 
- 
--public:     // wxString getters
--
--    //! Returns the URL you are transfering from.
--    wxString GetURL() const { return m_szURL; }
--
--    //! Returns the current download/upload speed in a human readable format.
--    wxString GetHumanReadableSpeed(const wxString &inv = _("Not available"), int prec = 1) const;
--
--    //! Returns the total bytes to download in a human-readable format.
--    wxString GetHumanReadableTotalBytes(const wxString &inv = _("Not available"), int prec = 1) const
--        { return wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)GetTotalBytes()), inv, prec); }
--
--    //! Returns the currently transferred bytes in a human-readable format.
--    wxString GetHumanReadableTransferredBytes(const wxString &inv = _("Not available"), int prec = 1) const
--        { return wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)GetTransferredBytes()), inv, prec); }
--
--
--public:     // pure virtual functions
-+public:     // wxString getters
-+
-+    //! Returns the URL you are transfering from.
-+    std::string GetURL() const { return m_szURL; }
-+
-+    //! Returns the current download/upload speed in a human readable format.
-+    std::string GetHumanReadableSpeed(const std::string &inv = GetNAText(), int prec = 1) const;
-+
-+    //! Returns the total bytes to download in a human-readable format.
-+    std::string GetHumanReadableTotalBytes(const std::string &inv = GetNAText(), int prec = 1) const
-+        {
-+            wxString s(inv.c_str(), wxConvUTF8);
-+            return std::string(wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)GetTotalBytes()), s, prec).mb_str());
-+        }
-+
-+    //! Returns the currently transferred bytes in a human-readable format.
-+    std::string GetHumanReadableTransferredBytes(const std::string &inv = GetNAText(), int prec = 1) const
-+        {
-+            wxString s(inv.c_str(), wxConvUTF8);
-+            return std::string(wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)GetTransferredBytes()), s, prec).mb_str());
-+        }
-+
-+
-+public:     // pure virtual functions
- 
-     //! Returns the total bytes to transfer.
-     virtual double GetTotalBytes() const = 0;
- 
-     //! Returns the bytes transferred so far.
-     virtual double GetTransferredBytes() const = 0;
--
--protected:
--    wxCurlBase *m_pCURL;
--    wxString m_szURL;
--
--    // NOTE: we need to store this date time to use it in GetElapsedTime:
--    //       we cannot use wxDateTime::Now() there because once the event is constructed,
--    //       GetElapsedTime() needs to return always the same value!
--    wxDateTime m_dt;
--};
--
--
-+
-+protected:
-+    wxCurlBase *m_pCURL;
-+    std::string m_szURL;
-+
-+    // NOTE: we need to store this date time to use it in GetElapsedTime:
-+    //       we cannot use wxDateTime::Now() there because once the event is constructed,
-+    //       GetElapsedTime() needs to return always the same value!
-+    wxDateTime m_dt;
-+
-+public:
-+    static std::string GetNAText()
-+    {
-+        wxString s = _("Not available");
-+        return std::string(s.mb_str());
-+    }
-+};
-+
-+
- // base.h: interface for the wxCurlDownloadEvent class.
- //
- //////////////////////////////////////////////////////////////////////
--
--//! This event gets posted by wxCURL with a frequent interval during operation
--//! (roughly once per second) no matter if data is being transfered or not.
--//! Unknown/unused argument values passed to the callback will be set to zero 
--//! (like if you only download data, the upload size will remain 0).
--//! Use the EVT_CURL_PROGRESS(id, function) macro to intercept this event.
--class WXDLLIMPEXP_CURL wxCurlDownloadEvent : public wxCurlProgressBaseEvent
-+
-+//! This event gets posted by wxCURL with a frequent interval during operation
-+//! (roughly once per second) no matter if data is being transfered or not.
-+//! Unknown/unused argument values passed to the callback will be set to zero
-+//! (like if you only download data, the upload size will remain 0).
-+//! Use the EVT_CURL_PROGRESS(id, function) macro to intercept this event.
-+class WXDLLIMPEXP_CURL wxCurlDownloadEvent : public wxCurlProgressBaseEvent
- {
--public:
--    wxCurlDownloadEvent();
--    wxCurlDownloadEvent(int id, wxCurlBase *originator,
--                        const double& rDownloadTotal, const double& rDownloadNow, 
--                        const wxString& szURL = wxEmptyString);
--    wxCurlDownloadEvent(const wxCurlDownloadEvent& event);
--
--    virtual wxEvent* Clone() const { return new wxCurlDownloadEvent(*this); }
-+public:
-+    wxCurlDownloadEvent();
-+    wxCurlDownloadEvent(int id, wxCurlBase *originator,
-+                        const double& rDownloadTotal, const double& rDownloadNow,
-+                        const std::string& szURL = "");
-+    wxCurlDownloadEvent(const wxCurlDownloadEvent& event);
-+
-+    virtual wxEvent* Clone() const { return new wxCurlDownloadEvent(*this); }
- 
- 
-     //! Returns the number of bytes downloaded so far.
-@@ -159,14 +172,17 @@ public:
-     double GetTransferredBytes() const { return m_rDownloadNow; }
- 
-     //! Returns the total number of bytes to download.
--    double GetTotalBytes() const { return m_rDownloadTotal; }
--
--    //! Returns the currently downloaded bytes in a human-readable format.
--    wxString GetHumanReadableDownloadedBytes(const wxString &inv = _("Not available"), int prec = 1) const
--        { return wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)m_rDownloadNow), inv, prec); }
--
--
--protected:
-+    double GetTotalBytes() const { return m_rDownloadTotal; }
-+
-+    //! Returns the currently downloaded bytes in a human-readable format.
-+    std::string GetHumanReadableDownloadedBytes(const std::string &inv = wxCurlProgressBaseEvent::GetNAText(), int prec = 1) const
-+        {
-+            wxString s(inv.c_str(), wxConvUTF8);
-+            return std::string(wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)m_rDownloadNow), s, prec).mb_str());
-+        }
-+
-+
-+protected:
-     double m_rDownloadTotal, m_rDownloadNow;
- 
- private:
-@@ -181,22 +197,22 @@ typedef void (wxEvtHandler::*wxCurlDownloadEventFunction)(wxCurlDownloadEvent&);
- #define EVT_CURL_DOWNLOAD(id, fn) \
-     wx__DECLARE_EVT1(wxCURL_DOWNLOAD_EVENT, id, wxCurlDownloadEventHandler(fn))
- 
--
--//! This event gets posted by wxCURL with a frequent interval during operation
--//! (roughly once per second) no matter if data is being transfered or not.
--//! Unknown/unused argument values passed to the callback will be set to zero 
--//! (like if you only download data, the upload size will remain 0).
--//! Use the EVT_CURL_PROGRESS(id, function) macro to intercept this event.
--class WXDLLIMPEXP_CURL wxCurlUploadEvent : public wxCurlProgressBaseEvent
-+
-+//! This event gets posted by wxCURL with a frequent interval during operation
-+//! (roughly once per second) no matter if data is being transfered or not.
-+//! Unknown/unused argument values passed to the callback will be set to zero
-+//! (like if you only download data, the upload size will remain 0).
-+//! Use the EVT_CURL_PROGRESS(id, function) macro to intercept this event.
-+class WXDLLIMPEXP_CURL wxCurlUploadEvent : public wxCurlProgressBaseEvent
- {
--public:
--    wxCurlUploadEvent();
--    wxCurlUploadEvent(int id, wxCurlBase *originator,
--                        const double& rUploadTotal, const double& rUploadNow, 
--                        const wxString& szURL = wxEmptyString);
--    wxCurlUploadEvent(const wxCurlUploadEvent& event);
--
--    virtual wxEvent* Clone() const { return new wxCurlUploadEvent(*this); }
-+public:
-+    wxCurlUploadEvent();
-+    wxCurlUploadEvent(int id, wxCurlBase *originator,
-+                        const double& rUploadTotal, const double& rUploadNow,
-+                        const std::string& szURL = "");
-+    wxCurlUploadEvent(const wxCurlUploadEvent& event);
-+
-+    virtual wxEvent* Clone() const { return new wxCurlUploadEvent(*this); }
- 
- 
-     //! Returns the number of bytes uploaded so far.
-@@ -204,14 +220,17 @@ public:
-     double GetTransferredBytes() const { return m_rUploadNow; }
- 
-     //! Returns the total number of bytes to upload.
--    double GetTotalBytes() const { return m_rUploadTotal; }
--
--    //! Returns the currently uploaded bytes in a human-readable format.
--    wxString GetHumanReadableUploadedBytes(const wxString &inv = _("Not available"), int prec = 1) const
--        { return wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)m_rUploadNow), inv, prec); }
--
--protected:
--    double m_rUploadTotal, m_rUploadNow;
-+    double GetTotalBytes() const { return m_rUploadTotal; }
-+
-+    //! Returns the currently uploaded bytes in a human-readable format.
-+    std::string GetHumanReadableUploadedBytes(const std::string &inv = wxCurlProgressBaseEvent::GetNAText(), int prec = 1) const
-+        {
-+            wxString s(inv.c_str(), wxConvUTF8);
-+            return std::string(wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)m_rUploadNow), s, prec).mb_str());
-+        }
-+
-+protected:
-+    double m_rUploadTotal, m_rUploadNow;
- 
- private:
-     DECLARE_DYNAMIC_CLASS(wxCurlUploadEvent);
-@@ -234,22 +253,22 @@ typedef void (wxEvtHandler::*wxCurlUploadEventFunction)(wxCurlUploadEvent&);
- //! This event get posted before the beginning of any tranfer operation.
- //! Use the EVT_CURL_BEGIN_PERFORM(id, function) macro to intercept this event.
- class WXDLLIMPEXP_CURL wxCurlBeginPerformEvent : public wxEvent
--{
--public:
--    wxCurlBeginPerformEvent();
--    wxCurlBeginPerformEvent(int id, const wxString& szURL);
--    wxCurlBeginPerformEvent(const wxCurlBeginPerformEvent& event);
--
--    virtual wxEvent* Clone() const { return new wxCurlBeginPerformEvent(*this); }
--
--    //! Returns the URL you are going to transfering from/to.
--    wxString GetURL() const { return m_szURL; }
--
--protected:
--    wxString m_szURL;
--
--private:
--    DECLARE_DYNAMIC_CLASS(wxCurlBeginPerformEvent);
-+{
-+public:
-+    wxCurlBeginPerformEvent();
-+    wxCurlBeginPerformEvent(int id, const std::string& szURL);
-+    wxCurlBeginPerformEvent(const wxCurlBeginPerformEvent& event);
-+
-+    virtual wxEvent* Clone() const { return new wxCurlBeginPerformEvent(*this); }
-+
-+    //! Returns the URL you are going to transfering from/to.
-+    std::string GetURL() const { return m_szURL; }
-+
-+protected:
-+    std::string m_szURL;
-+
-+private:
-+    DECLARE_DYNAMIC_CLASS(wxCurlBeginPerformEvent);
- };
- 
- typedef void (wxEvtHandler::*wxCurlBeginPerformEventFunction)(wxCurlBeginPerformEvent&);
-@@ -269,28 +288,28 @@ typedef void (wxEvtHandler::*wxCurlBeginPerformEventFunction)(wxCurlBeginPerform
- //! This event get posted at the end of any tranfer operation.
- //! Use the EVT_CURL_END_PERFORM(id, function) macro to intercept this event.
- class WXDLLIMPEXP_CURL wxCurlEndPerformEvent : public wxEvent
--{
--public:
--    wxCurlEndPerformEvent();
--    wxCurlEndPerformEvent(int id, const wxString& szURL, const long& iResponseCode);
--    wxCurlEndPerformEvent(const wxCurlEndPerformEvent& event);
--
--    virtual wxEvent* Clone() const { return new wxCurlEndPerformEvent(*this); }
--
--    //! Returns the URL you are going to transfering from/to.
--    wxString GetURL() const { return m_szURL; }
--
--    //! Returns the response code for the operation.
--    long GetResponseCode() const { return m_iResponseCode; }
-+{
-+public:
-+    wxCurlEndPerformEvent();
-+    wxCurlEndPerformEvent(int id, const std::string& szURL, const long& iResponseCode);
-+    wxCurlEndPerformEvent(const wxCurlEndPerformEvent& event);
-+
-+    virtual wxEvent* Clone() const { return new wxCurlEndPerformEvent(*this); }
-+
-+    //! Returns the URL you are going to transfering from/to.
-+    std::string GetURL() const { return m_szURL; }
-+
-+    //! Returns the response code for the operation.
-+    long GetResponseCode() const { return m_iResponseCode; }
- 
-     //! Returns true if the response code indicates a valid transfer.
--    bool IsSuccessful() const { return ((m_iResponseCode > 199) && (m_iResponseCode < 300)); }
--
--protected:
--    wxString	m_szURL;
--    long		m_iResponseCode;
--
--private:
-+    bool IsSuccessful() const { return ((m_iResponseCode > 199) && (m_iResponseCode < 300)); }
-+
-+protected:
-+    std::string	m_szURL;
-+    long		m_iResponseCode;
-+
-+private:
-     DECLARE_DYNAMIC_CLASS(wxCurlEndPerformEvent);
- };
- 
-@@ -345,15 +364,15 @@ extern "C"
- //! - use #SetOpt to set libCURL options you're interested to
- //!   or alternatively the other various Set*() functions
- //! - call #Perform to perform the operation
--class WXDLLIMPEXP_CURL wxCurlBase
--{
--public:
--    wxCurlBase(const wxString& szURL = wxEmptyString, 
--               const wxString& szUserName = wxEmptyString,
--               const wxString& szPassword = wxEmptyString, 
--               wxEvtHandler* pEvtHandler = NULL, int id = wxID_ANY,
--               long flags = wxCURL_DEFAULT_FLAGS);
--
-+class WXDLLIMPEXP_CURL wxCurlBase
-+{
-+public:
-+    wxCurlBase(const wxString& szURL = wxEmptyString,
-+               const wxString& szUserName = wxEmptyString,
-+               const wxString& szPassword = wxEmptyString,
-+               wxEvtHandler* pEvtHandler = NULL, int id = wxID_ANY,
-+               long flags = wxCURL_DEFAULT_FLAGS);
-+
-     virtual ~wxCurlBase();
- 
- 
-@@ -379,13 +398,13 @@ public:
-     // Internal handle management:
- 
-     //! Initializes the internal libCURL handle. This function is automatically called by
--    //! the constructor.
--    bool InitHandle();
--
--    //! Closes this libCURL session. This will effectively close all connections this handle 
--    //! has used and possibly has kept open until now.
--    //! This function is automatically called by the destructor.
--    bool CleanupHandle();
-+    //! the constructor.
-+    bool InitHandle();
-+
-+    //! Closes this libCURL session. This will effectively close all connections this handle
-+    //! has used and possibly has kept open until now.
-+    //! This function is automatically called by the destructor.
-+    bool CleanupHandle();
- 
-     //! Reinit the handle of this libCURL session. Equivalent to call #CleanupHandle and then #InitHandle.
-     bool ReInitHandle();
-@@ -393,75 +412,76 @@ public:
-     //! Re-initializes all options previously set on this libCURL session to the default values.
-     bool ResetHandle();
- 
--    //! Is the underlying libCURL handle valid?
--    bool IsOk() const { return m_pCURL != NULL; }
--
--
--    // Member Data Access Methods (MDA)
--
--    //! Sets the event handler to which the wxCurlDownloadEvent, wxCurlBeginPerformEvent and
-+    //! Is the underlying libCURL handle valid?
-+    bool IsOk() const { return m_pCURL != NULL; }
-+
-+    // Member Data Access Methods (MDA)
-+
-+    //! Sets the event handler to which the wxCurlDownloadEvent, wxCurlBeginPerformEvent and
-     //! wxCurlEndPerformEvent will be sent if they are enabled (see #SetFlags).
--    bool			SetEvtHandler(wxEvtHandler* pParent, int id = wxID_ANY);
--    wxEvtHandler*	GetEvtHandler() const;
--    int             GetId() const;
--
--    //! Sets the "event policy" of wxCURL: if you pass zero, then no events will ever be sent.
--    //! The wxCURL_SEND_PROGRESS_EVENTS and wxCURL_SEND_BEGINEND_EVENTS flags instead tell
-+    bool			SetEvtHandler(wxEvtHandler* pParent, int id = wxID_ANY);
-+    wxEvtHandler*	GetEvtHandler() const;
-+    int             GetId() const;
-+	void SetAbort(bool a);
-+	bool GetAbort() const;
-+
-+    //! Sets the "event policy" of wxCURL: if you pass zero, then no events will ever be sent.
-+    //! The wxCURL_SEND_PROGRESS_EVENTS and wxCURL_SEND_BEGINEND_EVENTS flags instead tell
-     //! wxCURL to send respectively the wxCurlDownloadEvent and wxCurlBeginPerformEvent,
-     //! wxCurlEndPerformEvent events.
-     void		SetFlags(long flags);
-     long        GetFlags() const;
- 
--    //! Sets the base URL. This allows you to specify a 'base' URL if you
--    //! are performing multiple actions.
--    void		SetBaseURL(const wxString& szBaseURL);
--    wxString	GetBaseURL() const;
--
--    //! Sets the current URL. The 'base url' will be prepended to the given string.
--    void        SetURL(const wxString &szRelativeURL);
--
--    //! Returns the current 'full' URL. I.e. the real URL being used for the transfer.
--    wxString    GetURL() const;
--
--    //! Sets the host Port.  This allows you to specify a specific (non-
--    //! default port) if you like.  The value -1 means that the default port
-+    //! Sets the base URL. This allows you to specify a 'base' URL if you
-+    //! are performing multiple actions.
-+    void		SetBaseURL(const wxString& szBaseURL);
-+    std::string	GetBaseURL() const;
-+
-+    //! Sets the current URL. The 'base url' will be prepended to the given string.
-+    void        SetURL(const wxString &szRelativeURL);
-+
-+    //! Returns the current 'full' URL. I.e. the real URL being used for the transfer.
-+    std::string    GetURL() const;
-+
-+    //! Sets the host Port.  This allows you to specify a specific (non-
-+    //! default port) if you like.  The value -1 means that the default port
-     //! will be used.
-     void		SetPort(const long& iPort);
-     long		GetPort() const;
- 
--    //! Sets the Username. If no username is
--    //! needed, simply assign an empty string (which is the default).
--    void		SetUsername(const wxString& szUsername);
--    wxString	GetUsername() const;
--
--    //! Sets the Password. If no password is
--    //! needed, simply assign an empty string (which is the default).
--    void		SetPassword(const wxString& szPassword);
--    wxString	GetPassword() const;
--
--    //! Returns the header of the response.
--    wxString	GetResponseHeader() const;
--    wxString	GetResponseBody() const;		// May only contain data on NON-GET calls.
--    long		GetResponseCode() const;
--
--    //! Should the proxy be used?
-+    //! Sets the Username. If no username is
-+    //! needed, simply assign an empty string (which is the default).
-+    void		SetUsername(const wxString& szUsername);
-+    std::string	GetUsername() const;
-+
-+    //! Sets the Password. If no password is
-+    //! needed, simply assign an empty string (which is the default).
-+    void		SetPassword(const wxString& szPassword);
-+    std::string	GetPassword() const;
-+
-+    //! Returns the header of the response.
-+    std::string	GetResponseHeader() const;
-+    std::string	GetResponseBody() const;		// May only contain data on NON-GET calls.
-+    long		GetResponseCode() const;
-+
-+    //! Should the proxy be used?
-     void		UseProxy(const bool& bUseProxy);
-     bool		UseProxy() const;
--
--    //! Sets proxy host.
--    void		SetProxyHost(const wxString& szProxyHost);
--    wxString	GetProxyHost() const;
--
--    //! Sets the username for proxy access (if needed).
--    void		SetProxyUsername(const wxString& szProxyUsername);
--    wxString	GetProxyUsername() const;
--
--    //! Sets the password for proxy access (if needed).
--    void		SetProxyPassword(const wxString& szProxyPassword);
--    wxString	GetProxyPassword() const;
--
--    //! Sets the port for proxy access.
--    void		SetProxyPort(const long& iProxyPort);
-+
-+    //! Sets proxy host.
-+    void		SetProxyHost(const wxString& szProxyHost);
-+    std::string	GetProxyHost() const;
-+
-+    //! Sets the username for proxy access (if needed).
-+    void		SetProxyUsername(const wxString& szProxyUsername);
-+    std::string	GetProxyUsername() const;
-+
-+    //! Sets the password for proxy access (if needed).
-+    void		SetProxyPassword(const wxString& szProxyPassword);
-+    std::string	GetProxyPassword() const;
-+
-+    //! Sets the port for proxy access.
-+    void		SetProxyPort(const long& iProxyPort);
-     long		GetProxyPort() const;
- 
-     //! Sets verbose mode on/off. Note that in verbose mode a lot of info
-@@ -474,18 +494,18 @@ public:
-     bool		GetVerboseStream(wxOutputStream& destStream) const;
- 
-     //! Appends to the given stream the verbose messages collected so far.
--    bool		GetVerboseString(wxString& szStream) const;
--
--    //! Returns a generic, short string describing the last occurred error.
--    wxString    GetErrorString() const;
--
--    //! Returns a short string with a detailed description of last occurred error.
--    //! This is typically something technical which you may want to hide from the
--    //! end users of your application (and e.g. show only in log files).
--    wxString    GetDetailedErrorString() const;
--
--
--    // Static LibCURL Initialization Methods - Call At Program Init and Close...
-+    bool		GetVerboseString(wxString& szStream) const;
-+
-+    //! Returns a generic, short string describing the last occurred error.
-+    std::string    GetErrorString() const;
-+
-+    //! Returns a short string with a detailed description of last occurred error.
-+    //! This is typically something technical which you may want to hide from the
-+    //! end users of your application (and e.g. show only in log files).
-+    std::string    GetDetailedErrorString() const;
-+
-+
-+    // Static LibCURL Initialization Methods - Call At Program Init and Close...
- 
-     //! Initializes the libCURL. Call this only once at the beginning of your program.
-     static void Init();
-@@ -494,16 +514,16 @@ public:
-     static void Shutdown();
- 
- 
--    // Static LibCURL Utility Methods
--
--    static wxDateTime GetDateFromString(const wxString& szDate);
--    static wxString GetURLEncodedString(const wxString& szData);
--    static wxString GetStringFromURLEncoded(const wxString& szData);
--
--    static wxString GetCURLVersion();
--
--
--protected:      // protected utils used by wxCurl*Thread classes
-+    // Static LibCURL Utility Methods
-+
-+    static wxDateTime GetDateFromString(const wxString& szDate);
-+    static std::string GetURLEncodedString(const wxString& szData);
-+    static std::string GetStringFromURLEncoded(const wxString& szData);
-+
-+    static std::string GetCURLVersion();
-+
-+
-+protected:      // protected utils used by wxCurl*Thread classes
- 
-     friend class wxCurlBaseThread;
-     friend class wxCurlSizeQueryThread;
-@@ -540,13 +560,14 @@ protected:      // protected utils used by wxCurl*Thread classes
-     }
- 
- protected:
--
--    // The internal pointer to the libCURL session.
--    CURL*                   m_pCURL;
--
--
--    // libCURL <-> wxString conversions helpers (see below)
--
-+
-+    // The internal pointer to the libCURL session.
-+    CURL*                   m_pCURL;
-+	// Flag for terminating a possibly hung transfer
-+	bool                    m_bAbortHungTransfer;
-+
-+    // libCURL <-> wxString conversions helpers (see below)
-+
-     #define wxCURL_BUF2STRING(x)         wxString((const char*)(x), wxConvLibc)
- 
- #if wxUSE_UNICODE
-diff --git a/src/base.cpp b/src/base.cpp
-index e86f85b..5806cf8 100644
---- a/src/base.cpp
-+++ b/src/base.cpp
-@@ -17,13 +17,13 @@
- 
- #ifndef WX_PRECOMP
-     #include "wx/wx.h"
--#endif
--
--#ifdef __WXMSW__
--    #include <wx/msw/msvcrt.h>      // useful to catch memory leaks when compiling under MSVC 
--#endif
--
--#include <stdio.h>
-+#endif
-+
-+#ifdef __WXMSW__
-+    #include <wx/msw/msvcrt.h>      // useful to catch memory leaks when compiling under MSVC
-+#endif
-+
-+#include <stdio.h>
- #include <stdarg.h>
- 
- #include <wx/curl/base.h>
-@@ -37,16 +37,17 @@
- //////////////////////////////////////////////////////////////////////
- // C Functions for LibCURL
- //////////////////////////////////////////////////////////////////////
--
--extern "C"
--{
--    int wxcurl_evt_progress_func(void* ptr, double rDlTotal, double rDlNow, 
--                                 double rUlTotal, double rUlNow)
--    {
--        wxCurlBase *curl = wx_static_cast(wxCurlBase*, ptr);
--        if(curl)
--        {
--            if (rUlTotal == 0 || rUlNow == 0)
-+
-+extern "C"
-+{
-+    int wxcurl_evt_progress_func(void* ptr, double rDlTotal, double rDlNow,
-+                                 double rUlTotal, double rUlNow)
-+    {
-+        wxCurlBase *curl = wx_static_cast(wxCurlBase*, ptr);
-+		int res = 0;
-+        if(curl)
-+        {
-+            if (rUlTotal == 0 || rUlNow == 0)
-             {
-                 /* should be a download event */
-                 wxCurlDownloadEvent evt(curl->GetId(), curl, rDlTotal, rDlNow, curl->GetURL());
-@@ -56,15 +57,17 @@ extern "C"
-             if (rDlTotal == 0 || rDlNow == 0)
-             {
-                 /* should be an upload event */
--                wxCurlDownloadEvent evt(curl->GetId(), curl, rUlTotal, rUlNow, curl->GetURL());
--                wxPostEvent(curl->GetEvtHandler(), evt);
--            }
--        }
--
--        return 0;
--    }
--
--    int wxcurl_verbose_stream_write(CURL * crlptr, curl_infotype info,
-+                wxCurlDownloadEvent evt(curl->GetId(), curl, rUlTotal, rUlNow, curl->GetURL());
-+                wxPostEvent(curl->GetEvtHandler(), evt);
-+            }
-+
-+            if ( curl->GetAbort() )
-+                res = 1;    // This will cause curl_easy_perform() to return CURLE_WRITE_ERROR immediately
-+        }
-+        return res;
-+    }
-+
-+    int wxcurl_verbose_stream_write(CURL * crlptr, curl_infotype info,
-                                     char * cStrMessage, size_t msgSize, void * buffer)
-     {
-         wxString szMessage((const char*)cStrMessage, wxConvLibc, msgSize);
-@@ -155,16 +158,17 @@ extern "C"
-     size_t wxcurl_string_read(void* ptr, size_t size, size_t nmemb, void* pcharbuf)
-     {
-         size_t iRealSize = size * nmemb;
--        size_t iRetVal = 0;
--
--        wxCharBuffer* pStr = (wxCharBuffer*) pcharbuf;
--        size_t len = strlen(*pStr);
--
--        if(pStr)
--        {
--            if(len >= iRealSize)
--            {
--                strncpy((char*)ptr, (const char*)(*pStr), iRealSize);
-+        size_t iRetVal = 0;
-+
-+        wxCharBuffer* pStr = (wxCharBuffer*) pcharbuf;
-+        size_t len = 0;
-+
-+        if(pStr)
-+        {
-+            len = strlen(*pStr);
-+            if(len >= iRealSize)
-+            {
-+                strncpy((char*)ptr, (const char*)(*pStr), iRealSize);
-                 iRetVal = iRealSize;
-             }
-             else
-@@ -238,20 +242,21 @@ wxTimeSpan wxCurlProgressBaseEvent::GetEstimatedRemainingTime() const
- 
-     if (est.IsLongerThan(elapsed))
-         return est - elapsed;
--    return wxTimeSpan(0);       // probably est==0 because GetTotalBytes()==0
--}
--
--wxString wxCurlProgressBaseEvent::GetHumanReadableSpeed(const wxString &invalid, int precision) const
--{
--    double speed = GetSpeed();
--    if (speed == 0 || wxIsNaN(speed))
--        return invalid;
--
--    wxULongLong ull((wxULongLong_t)speed);
--    return wxFileName::GetHumanReadableSize(ull, invalid, precision) + wxS("/s");
--}
--
--
-+    return wxTimeSpan(0);       // probably est==0 because GetTotalBytes()==0
-+}
-+
-+std::string wxCurlProgressBaseEvent::GetHumanReadableSpeed(const std::string &invalid, int precision) const
-+{
-+    double speed = GetSpeed();
-+    if (speed == 0 || wxIsNaN(speed))
-+        return invalid;
-+
-+    wxULongLong ull((wxULongLong_t)speed);
-+    wxString s(invalid.c_str(), wxConvUTF8);
-+    return std::string( wxFileName::GetHumanReadableSize(ull, s, precision).mb_str() ) + "/s";
-+}
-+
-+
- // base.cpp: implementation of the wxCurlDownloadEvent class.
- //
- //////////////////////////////////////////////////////////////////////
-@@ -263,19 +268,19 @@ wxString wxCurlProgressBaseEvent::GetHumanReadableSpeed(const wxString &invalid,
- DEFINE_EVENT_TYPE(wxCURL_DOWNLOAD_EVENT);
- 
- IMPLEMENT_DYNAMIC_CLASS(wxCurlDownloadEvent, wxEvent);
--
--wxCurlDownloadEvent::wxCurlDownloadEvent()
--: wxCurlProgressBaseEvent(-1, wxCURL_DOWNLOAD_EVENT),
--m_rDownloadNow(0.0), m_rDownloadTotal(0.0)
--{
--}
--
--wxCurlDownloadEvent::wxCurlDownloadEvent(int id, wxCurlBase *originator,
--                                        const double& rDownloadTotal, const double& rDownloadNow, 
--                                        const wxString& szURL /*= wxEmptyString*/)
--: wxCurlProgressBaseEvent(id, wxCURL_DOWNLOAD_EVENT, originator, szURL),
--m_rDownloadTotal(rDownloadTotal), m_rDownloadNow(rDownloadNow)
--{
-+
-+wxCurlDownloadEvent::wxCurlDownloadEvent()
-+: wxCurlProgressBaseEvent(-1, wxCURL_DOWNLOAD_EVENT),
-+  m_rDownloadTotal(0.0), m_rDownloadNow(0.0)
-+{
-+}
-+
-+wxCurlDownloadEvent::wxCurlDownloadEvent(int id, wxCurlBase *originator,
-+                                        const double& rDownloadTotal, const double& rDownloadNow,
-+                                        const std::string& szURL /*= wxEmptyString*/)
-+: wxCurlProgressBaseEvent(id, wxCURL_DOWNLOAD_EVENT, originator, szURL),
-+m_rDownloadTotal(rDownloadTotal), m_rDownloadNow(rDownloadNow)
-+{
- }
- 
- wxCurlDownloadEvent::wxCurlDownloadEvent(const wxCurlDownloadEvent& event)
-@@ -298,19 +303,19 @@ wxCurlDownloadEvent::wxCurlDownloadEvent(const wxCurlDownloadEvent& event)
- DEFINE_EVENT_TYPE(wxCURL_UPLOAD_EVENT);
- 
- IMPLEMENT_DYNAMIC_CLASS(wxCurlUploadEvent, wxEvent);
--
--wxCurlUploadEvent::wxCurlUploadEvent()
--: wxCurlProgressBaseEvent(-1, wxCURL_UPLOAD_EVENT),
--m_rUploadNow(0.0), m_rUploadTotal(0.0)
--{
--}
--
--wxCurlUploadEvent::wxCurlUploadEvent(int id, wxCurlBase *originator,
--                                        const double& rUploadTotal, const double& rUploadNow, 
--                                        const wxString& szURL /*= wxEmptyString*/)
--: wxCurlProgressBaseEvent(id, wxCURL_UPLOAD_EVENT, originator, szURL),
--m_rUploadTotal(rUploadTotal), m_rUploadNow(rUploadNow)
--{
-+
-+wxCurlUploadEvent::wxCurlUploadEvent()
-+: wxCurlProgressBaseEvent(-1, wxCURL_UPLOAD_EVENT),
-+  m_rUploadTotal(0.0), m_rUploadNow(0.0)
-+{
-+}
-+
-+wxCurlUploadEvent::wxCurlUploadEvent(int id, wxCurlBase *originator,
-+                                        const double& rUploadTotal, const double& rUploadNow,
-+                                        const std::string& szURL /*= wxEmptyString*/)
-+: wxCurlProgressBaseEvent(id, wxCURL_UPLOAD_EVENT, originator, szURL),
-+m_rUploadTotal(rUploadTotal), m_rUploadNow(rUploadNow)
-+{
- }
- 
- wxCurlUploadEvent::wxCurlUploadEvent(const wxCurlUploadEvent& event)
-@@ -336,13 +341,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxCurlBeginPerformEvent, wxEvent);
- 
- wxCurlBeginPerformEvent::wxCurlBeginPerformEvent()
- : wxEvent(-1, wxCURL_BEGIN_PERFORM_EVENT)
--{
--}
--
--wxCurlBeginPerformEvent::wxCurlBeginPerformEvent(int id, const wxString& szURL)
--: wxEvent(id, wxCURL_BEGIN_PERFORM_EVENT),
--m_szURL(szURL)
--{
-+{
-+}
-+
-+wxCurlBeginPerformEvent::wxCurlBeginPerformEvent(int id, const std::string& szURL)
-+: wxEvent(id, wxCURL_BEGIN_PERFORM_EVENT),
-+m_szURL(szURL)
-+{
- }
- 
- wxCurlBeginPerformEvent::wxCurlBeginPerformEvent(const wxCurlBeginPerformEvent& event)
-@@ -366,13 +371,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxCurlEndPerformEvent, wxEvent);
- wxCurlEndPerformEvent::wxCurlEndPerformEvent()
- : wxEvent(-1, wxCURL_END_PERFORM_EVENT),
- m_iResponseCode(0)
--{
--}
--
--wxCurlEndPerformEvent::wxCurlEndPerformEvent(int id, const wxString& szURL, const long& iResponseCode)
--: wxEvent(id, wxCURL_END_PERFORM_EVENT),
--m_szURL(szURL),
--m_iResponseCode(iResponseCode)
-+{
-+}
-+
-+wxCurlEndPerformEvent::wxCurlEndPerformEvent(int id, const std::string& szURL, const long& iResponseCode)
-+: wxEvent(id, wxCURL_END_PERFORM_EVENT),
-+m_szURL(szURL),
-+m_iResponseCode(iResponseCode)
- {
- }
- 
-@@ -394,22 +399,26 @@ wxCurlEndPerformEvent::wxCurlEndPerformEvent(const wxCurlEndPerformEvent& event)
- wxCurlBase::wxCurlBase(const wxString& szURL /*= wxEmptyString*/,
-                     const wxString& szUserName /*= wxEmptyString*/,
-                     const wxString& szPassword /*= wxEmptyString*/,
--                    wxEvtHandler* pEvtHandler /*= NULL*/,
--                    int id /*= wxID_ANY*/,
--                    long flags /*=wxCURL_DEFAULT_FLAGS*/)
--: m_szBaseURL(wxCURL_STRING2BUF(szURL)),
--m_szCurrFullURL(wxCURL_STRING2BUF(szURL)),
--m_szUsername(wxCURL_STRING2BUF(szUserName)),
--m_szPassword(wxCURL_STRING2BUF(szPassword)),
--m_iHostPort(-1), m_iResponseCode(-1),
--m_bUseProxy(false), m_iProxyPort(-1),
--m_pCURL(NULL), m_pHeaders(NULL), 
--m_pEvtHandler(pEvtHandler), m_nId(id),
--m_nFlags(flags),
--m_bVerbose(false)
--{
--    m_szDetailedErrorBuffer[0] = '\0';
--    m_progressCallback = wxcurl_evt_progress_func;
-+                    wxEvtHandler* pEvtHandler /*= NULL*/,
-+                    int id /*= wxID_ANY*/,
-+                    long flags /*=wxCURL_DEFAULT_FLAGS*/)
-+ : m_pCURL(NULL),
-+m_bAbortHungTransfer(false),
-+m_szCurrFullURL(wxCURL_STRING2BUF(szURL)),
-+m_szUsername(wxCURL_STRING2BUF(szUserName)),
-+m_szPassword(wxCURL_STRING2BUF(szPassword)),
-+m_iHostPort(-1),
-+m_iResponseCode(-1),
-+m_pHeaders(NULL),
-+m_bUseProxy(false),
-+m_iProxyPort(-1),
-+m_bVerbose(false),
-+m_pEvtHandler(pEvtHandler),
-+m_nId(id),
-+m_nFlags(flags)
-+{
-+    m_szDetailedErrorBuffer[0] = '\0';
-+    m_progressCallback = wxcurl_evt_progress_func;
-     m_progressData = this;
- 
-     InitHandle();
-@@ -471,13 +480,13 @@ bool wxCurlBase::SetOpt(int opt, ...)
- bool wxCurlBase::SetStringOpt(CURLoption option, const wxCharBuffer &str)
- {
-     // VERY IMPORTANT: the caller must ensure given wxCharBuffer is valid
--    //                 for all the time it's owned by libCURL
--
--    /*  FIXME: converting to plain ASCII is not always the Best Thing. E.g.
--            for CURLOPT_USERPWD, we'd need to consult RFC2616 (HTTP) or 
--            another RFC depending on the authentication system in use, etc etc
--            For now we convert to pure ASCII which in 99% of the cases will
--            Just Do the Work
-+    //                 for all the time it's owned by libCURL
-+
-+    /*  FIXME: converting to plain ASCII is not always the Best Thing. E.g.
-+            for CURLOPT_USERPWD, we'd need to consult RFC2616 (HTTP) or
-+            another RFC depending on the authentication system in use, etc etc
-+            For now we convert to pure ASCII which in 99% of the cases will
-+            Just Do the Work
-     */
- 
-     return SetOpt(option, (const char*)str);
-@@ -496,19 +505,21 @@ bool wxCurlBase::GetInfo(int info, ...) const
-     res = curl_easy_getinfo(m_pCURL, cInfo, pParam);
- 
-     DumpErrorIfNeed(res);
-+    va_end(arg);
-     return (res == CURLE_OK);
--}
--
-+}
-+
- bool wxCurlBase::Perform()
- {
-     CURLcode res = CURLE_OK;
--
--    if((m_nFlags & wxCURL_SEND_BEGINEND_EVENTS) && m_pEvtHandler)
--    {
--        wxCurlBeginPerformEvent bgnEvent(m_nId, wxCURL_BUF2STRING(m_szCurrFullURL));
--        wxPostEvent(m_pEvtHandler, bgnEvent);
--    }
--
-+
-+    if((m_nFlags & wxCURL_SEND_BEGINEND_EVENTS) && m_pEvtHandler)
-+    {
-+        wxString s = wxCURL_BUF2STRING(m_szCurrFullURL);
-+        wxCurlBeginPerformEvent bgnEvent(m_nId, std::string(s.mb_str()));
-+        wxPostEvent(m_pEvtHandler, bgnEvent);
-+    }
-+
-     // reset time-related vars:
-     m_tsElapsedOffset = 0;
-     m_dtBeginTransferSpan = wxDateTime::Now();
-@@ -518,13 +529,14 @@ bool wxCurlBase::Perform()
- 
-     // get the response code of the server
-     GetInfo(CURLINFO_RESPONSE_CODE, &m_iResponseCode);
--
--    if((m_nFlags & wxCURL_SEND_BEGINEND_EVENTS) && m_pEvtHandler)
--    {
--        wxCurlEndPerformEvent endEvent(m_nId, wxCURL_BUF2STRING(m_szCurrFullURL), m_iResponseCode);
--        wxPostEvent(m_pEvtHandler, endEvent);
--    }
--
-+
-+    if((m_nFlags & wxCURL_SEND_BEGINEND_EVENTS) && m_pEvtHandler)
-+    {
-+        wxString s = wxCURL_BUF2STRING(m_szCurrFullURL);
-+        wxCurlEndPerformEvent endEvent(m_nId, std::string(s.mb_str()), m_iResponseCode);
-+        wxPostEvent(m_pEvtHandler, endEvent);
-+    }
-+
-     DumpErrorIfNeed(res);
-     return (res == CURLE_OK);
- }
-@@ -609,13 +621,14 @@ long wxCurlBase::GetFlags() const
- 
- void wxCurlBase::SetBaseURL(const wxString& szBaseURL)
- {
--    m_szBaseURL = wxCURL_STRING2BUF(szBaseURL);
--}
--
--wxString wxCurlBase::GetBaseURL() const
--{
--    return wxCURL_BUF2STRING(m_szBaseURL);
--}
-+    m_szBaseURL = wxCURL_STRING2BUF(szBaseURL);
-+}
-+
-+std::string wxCurlBase::GetBaseURL() const
-+{
-+    wxString s = wxCURL_BUF2STRING(m_szBaseURL);
-+    return std::string(s.mb_str());
-+}
- 
- void wxCurlBase::SetURL(const wxString& szRelativeURL)
- {
-@@ -623,12 +636,13 @@ void wxCurlBase::SetURL(const wxString& szRelativeURL)
-     m_szCurrFullURL = wxCURL_STRING2BUF(str);
- }
- 
--wxString wxCurlBase::GetURL() const
--{ 
--    return wxCURL_BUF2STRING(m_szCurrFullURL);
--}
--
--void wxCurlBase::SetPort(const long& iPort)
-+std::string wxCurlBase::GetURL() const
-+{
-+    wxString s = wxCURL_BUF2STRING(m_szCurrFullURL);
-+    return std::string(s.mb_str());
-+}
-+
-+void wxCurlBase::SetPort(const long& iPort)
- {
-     m_iHostPort = iPort;
- }
-@@ -640,50 +654,56 @@ long wxCurlBase::GetPort() const
- 
- void wxCurlBase::SetUsername(const wxString& szUsername)
- {
--    m_szUsername = wxCURL_STRING2BUF(szUsername);
--}
--
--wxString wxCurlBase::GetUsername() const
--{
--    return wxCURL_BUF2STRING(m_szUsername);
--}
--
--void wxCurlBase::SetPassword(const wxString& szPassword)
--{
--    m_szPassword = wxCURL_STRING2BUF(szPassword);
--}
--
--wxString wxCurlBase::GetPassword() const
--{
--    return wxCURL_BUF2STRING(m_szPassword);
--}
--
--wxString wxCurlBase::GetResponseHeader() const
--{
--    return wxCURL_BUF2STRING(m_szResponseHeader);
--}
--
--wxString wxCurlBase::GetResponseBody() const
--{
--    return wxCURL_BUF2STRING(m_szResponseBody);
--}
--
--long wxCurlBase::GetResponseCode() const
--{
--    return m_iResponseCode;
--}
--
--wxString wxCurlBase::GetDetailedErrorString() const
-+    m_szUsername = wxCURL_STRING2BUF(szUsername);
-+}
-+
-+std::string wxCurlBase::GetUsername() const
-+{
-+    wxString s = wxCURL_BUF2STRING(m_szUsername);
-+    return std::string(s.mb_str());
-+}
-+
-+void wxCurlBase::SetPassword(const wxString& szPassword)
- {
--    return wxString((const char*)m_szDetailedErrorBuffer, wxConvLibc);
--}
--
--wxString wxCurlBase::GetErrorString() const
-+    m_szPassword = wxCURL_STRING2BUF(szPassword);
-+}
-+
-+std::string wxCurlBase::GetPassword() const
-+{
-+    wxString s = wxCURL_BUF2STRING(m_szPassword);
-+    return std::string(s.mb_str());
-+}
-+
-+std::string wxCurlBase::GetResponseHeader() const
-+{
-+    wxString s = wxCURL_BUF2STRING(m_szResponseHeader);
-+    return std::string(s.mb_str());
-+}
-+
-+std::string wxCurlBase::GetResponseBody() const
-+{
-+    wxString s = wxCURL_BUF2STRING(m_szResponseBody);
-+    return std::string(s.mb_str());
-+}
-+
-+long wxCurlBase::GetResponseCode() const
- {
--    return wxCURL_BUF2STRING(m_szLastError);
--}
--
--void wxCurlBase::UseProxy(const bool& bUseProxy)
-+    return m_iResponseCode;
-+}
-+
-+std::string wxCurlBase::GetDetailedErrorString() const
-+{
-+    wxString s = wxString((const char*)m_szDetailedErrorBuffer, wxConvLibc);
-+    return std::string(s.mb_str());
-+}
-+
-+std::string wxCurlBase::GetErrorString() const
-+{
-+    wxString s = wxCURL_BUF2STRING(m_szLastError);
-+    return std::string(s.mb_str());
-+}
-+
-+void wxCurlBase::UseProxy(const bool& bUseProxy)
- {
-     m_bUseProxy = bUseProxy;
- }
-@@ -695,35 +715,38 @@ bool wxCurlBase::UseProxy() const
- 
- void wxCurlBase::SetProxyHost(const wxString& szProxyHost)
- {
--    m_szProxyHost = wxCURL_STRING2BUF(szProxyHost);
--}
--
--wxString wxCurlBase::GetProxyHost() const
--{
--    return wxCURL_BUF2STRING(m_szProxyHost);
--}
--
--void wxCurlBase::SetProxyUsername(const wxString& szProxyUsername)
--{
--    m_szProxyUsername = wxCURL_STRING2BUF(szProxyUsername);
--}
--
--wxString wxCurlBase::GetProxyUsername() const
--{
--    return wxCURL_BUF2STRING(m_szProxyUsername);
--}
--
--void wxCurlBase::SetProxyPassword(const wxString& szProxyPassword)
-+    m_szProxyHost = wxCURL_STRING2BUF(szProxyHost);
-+}
-+
-+std::string wxCurlBase::GetProxyHost() const
-+{
-+    wxString s = wxCURL_BUF2STRING(m_szProxyHost);
-+    return std::string(s.mb_str());
-+}
-+
-+void wxCurlBase::SetProxyUsername(const wxString& szProxyUsername)
- {
--    m_szProxyPassword = wxCURL_STRING2BUF(szProxyPassword);
--}
--
--wxString wxCurlBase::GetProxyPassword() const
-+    m_szProxyUsername = wxCURL_STRING2BUF(szProxyUsername);
-+}
-+
-+std::string wxCurlBase::GetProxyUsername() const
-+{
-+    wxString s = wxCURL_BUF2STRING(m_szProxyUsername);
-+    return std::string(s.mb_str());
-+}
-+
-+void wxCurlBase::SetProxyPassword(const wxString& szProxyPassword)
- {
--    return wxCURL_BUF2STRING(m_szProxyPassword);
--}
--
--void wxCurlBase::SetProxyPort(const long& iProxyPort)
-+    m_szProxyPassword = wxCURL_STRING2BUF(szProxyPassword);
-+}
-+
-+std::string wxCurlBase::GetProxyPassword() const
-+{
-+    wxString s = wxCURL_BUF2STRING(m_szProxyPassword);
-+    return std::string(s.mb_str());
-+}
-+
-+void wxCurlBase::SetProxyPort(const long& iProxyPort)
- {
-     m_iProxyPort = iProxyPort;
- }
-@@ -768,12 +791,21 @@ bool wxCurlBase::GetVerboseString(wxString& szStream) const
-         return true;
-     }
- 
--    return false;
--}
--
--//////////////////////////////////////////////////////////////////////
--// Helper Methods
--//////////////////////////////////////////////////////////////////////
-+    return false;
-+}
-+
-+void wxCurlBase::SetAbort(bool a)
-+{
-+    m_bAbortHungTransfer = a;
-+}
-+
-+bool wxCurlBase::GetAbort() const
-+{
-+    return m_bAbortHungTransfer;
-+}
-+//////////////////////////////////////////////////////////////////////
-+// Helper Methods
-+//////////////////////////////////////////////////////////////////////
- 
- void wxCurlBase::SetCurlHandleToDefaults(const wxString& relativeURL)
- {
-@@ -786,12 +818,21 @@ void wxCurlBase::SetCurlHandleToDefaults(const wxString& relativeURL)
- 
-         SetStringOpt(CURLOPT_URL, m_szCurrFullURL);
- 
--        SetOpt(CURLOPT_HEADERFUNCTION, wxcurl_header_func);
--        SetOpt(CURLOPT_WRITEHEADER, &m_szResponseHeader);
--        SetOpt(CURLOPT_ERRORBUFFER, m_szDetailedErrorBuffer);
--
--        if(m_pEvtHandler && (m_nFlags & wxCURL_SEND_PROGRESS_EVENTS))
--        {
-+        SetOpt(CURLOPT_HEADERFUNCTION, wxcurl_header_func);
-+        SetOpt(CURLOPT_WRITEHEADER, &m_szResponseHeader);
-+        SetOpt(CURLOPT_ERRORBUFFER, m_szDetailedErrorBuffer);
-+        SetOpt(CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0\r\n" \
-+                    "Accept: application/xml,text/html,application/xhtml+xml;q=0.9,*/*;q=0.8\r\n" \
-+                    "Connection: keep-alive"); //Pretend we are a normal browser
-+        SetOpt(CURLOPT_FOLLOWLOCATION, 1L);
-+#ifdef __WXMSW__
-+        SetOpt(CURLOPT_CAINFO, "curl-ca-bundle.crt"); //Use our local certificate list on Windows
-+        SetOpt(CURLOPT_SSL_VERIFYPEER, true);		// FIXME: Temporary until we get certificates working
-+#endif
-+        SetOpt(CURLOPT_ENCODING, "gzip,deflate"); //Save bandwidth by using compression
-+
-+        if(m_pEvtHandler && (m_nFlags & wxCURL_SEND_PROGRESS_EVENTS))
-+        {
-             SetOpt(CURLOPT_NOPROGRESS, FALSE);
-             SetOpt(CURLOPT_PROGRESSFUNCTION, m_progressCallback);
-             SetOpt(CURLOPT_PROGRESSDATA, m_progressData);
-@@ -906,42 +947,42 @@ wxDateTime wxCurlBase::GetDateFromString(const wxString& szDate)
- {
-     time_t now = wxDateTime::Now().GetTicks();
- 
--    return wxDateTime(curl_getdate((const char*)(szDate.c_str()), &now));
--}
--
--wxString wxCurlBase::GetURLEncodedString(const wxString& szData)
--{
--    char* pszRetVal = curl_escape((const char*)(szData.c_str()), szData.Len());
--
-+    return wxDateTime(curl_getdate((const char*)(szDate.c_str()), &now));
-+}
-+
-+std::string wxCurlBase::GetURLEncodedString(const wxString& szData)
-+{
-+    char* pszRetVal = curl_escape((const char*)(szData.c_str()), szData.Len());
-+
-     if(pszRetVal)
-     {
-         wxString szRetVal((const char*)pszRetVal, wxConvLibc);
--
--        curl_free(pszRetVal);
--
--        return szRetVal;
--    }
--
--    return wxEmptyString;
--}
--
--wxString wxCurlBase::GetStringFromURLEncoded(const wxString& szData)
--{
--    char* pszRetVal = curl_unescape((const char*)(szData.c_str()), szData.Len());
--
-+
-+        curl_free(pszRetVal);
-+
-+        return std::string(szRetVal.mb_str());
-+    }
-+
-+    return "";
-+}
-+
-+std::string wxCurlBase::GetStringFromURLEncoded(const wxString& szData)
-+{
-+    char* pszRetVal = curl_unescape((const char*)(szData.c_str()), szData.Len());
-+
-     if(pszRetVal)
-     {
-         wxString szRetVal = (wxChar*)pszRetVal;
--
--        curl_free(pszRetVal);
--
--        return szRetVal;
--    }
--
--    return wxEmptyString;
--}
--
--wxString wxCurlBase::GetCURLVersion()
--{
--    return wxString(curl_version(), wxConvUTF8);
--}
-+
-+        curl_free(pszRetVal);
-+
-+        return std::string(szRetVal.mb_str());
-+    }
-+
-+    return "";
-+}
-+
-+std::string wxCurlBase::GetCURLVersion()
-+{
-+    return std::string(curl_version());
-+}


=====================================
debian/patches/0013-Makefile.in-Add-target-writing-library-l-definition.patch → debian/patches/0012-Makefile.in-Add-target-writing-library-l-definition.patch
=====================================


=====================================
debian/patches/0013-base-Add-SetAbort-GetAbort-handling-hung-transfers.patch
=====================================
@@ -0,0 +1,81 @@
+From: Pavel Kalian <pavel at kalian.cz>
+Date: Sat, 8 Aug 2015 10:30:59 -0500
+Subject: base: Add SetAbort()/GetAbort() handling hung transfers.
+
+---
+ include/wx/curl/base.h |  4 ++++
+ src/base.cpp           | 17 +++++++++++++++--
+ 2 files changed, 19 insertions(+), 2 deletions(-)
+
+diff --git a/include/wx/curl/base.h b/include/wx/curl/base.h
+index 1c0120c..f6f5a37 100644
+--- a/include/wx/curl/base.h
++++ b/include/wx/curl/base.h
+@@ -404,6 +404,8 @@ public:
+     bool			SetEvtHandler(wxEvtHandler* pParent, int id = wxID_ANY);
+     wxEvtHandler*	GetEvtHandler() const;
+     int             GetId() const;
++	void SetAbort(bool a);
++	bool GetAbort() const;
+ 
+     //! Sets the "event policy" of wxCURL: if you pass zero, then no events will ever be sent.
+     //! The wxCURL_SEND_PROGRESS_EVENTS and wxCURL_SEND_BEGINEND_EVENTS flags instead tell
+@@ -545,6 +547,8 @@ protected:
+     CURL*                   m_pCURL;
+ 
+ 
++	// Flag for terminating a possibly hung transfer
++	bool                    m_bAbortHungTransfer;
+     // libCURL <-> wxString conversions helpers (see below)
+ 
+     #define wxCURL_BUF2STRING(x)         wxString((const char*)(x), wxConvLibc)
+diff --git a/src/base.cpp b/src/base.cpp
+index e86f85b..f0e3011 100644
+--- a/src/base.cpp
++++ b/src/base.cpp
+@@ -44,6 +44,7 @@ extern "C"
+                                  double rUlTotal, double rUlNow)
+     {
+         wxCurlBase *curl = wx_static_cast(wxCurlBase*, ptr);
++	int res = 0;
+         if(curl)
+         {
+             if (rUlTotal == 0 || rUlNow == 0)
+@@ -59,9 +60,10 @@ extern "C"
+                 wxCurlDownloadEvent evt(curl->GetId(), curl, rUlTotal, rUlNow, curl->GetURL());
+                 wxPostEvent(curl->GetEvtHandler(), evt);
+             }
++            if ( curl->GetAbort() )
++                res = 1;    // This will cause curl_easy_perform() to return CURLE_WRITE_ERROR immediately
+         }
+-
+-        return 0;
++        return res;
+     }
+ 
+     int wxcurl_verbose_stream_write(CURL * crlptr, curl_infotype info,
+@@ -398,6 +400,7 @@ wxCurlBase::wxCurlBase(const wxString& szURL /*= wxEmptyString*/,
+                     int id /*= wxID_ANY*/,
+                     long flags /*=wxCURL_DEFAULT_FLAGS*/)
+ : m_szBaseURL(wxCURL_STRING2BUF(szURL)),
++m_bAbortHungTransfer(false),
+ m_szCurrFullURL(wxCURL_STRING2BUF(szURL)),
+ m_szUsername(wxCURL_STRING2BUF(szUserName)),
+ m_szPassword(wxCURL_STRING2BUF(szPassword)),
+@@ -698,6 +701,16 @@ void wxCurlBase::SetProxyHost(const wxString& szProxyHost)
+     m_szProxyHost = wxCURL_STRING2BUF(szProxyHost);
+ }
+ 
++void wxCurlBase::SetAbort(bool a)
++{
++    m_bAbortHungTransfer = a;
++}
++
++bool wxCurlBase::GetAbort() const
++{
++    return m_bAbortHungTransfer;
++}
++
+ wxString wxCurlBase::GetProxyHost() const
+ {
+     return wxCURL_BUF2STRING(m_szProxyHost);


=====================================
debian/patches/0014-base-Add-dummy-GetNAText.patch
=====================================
@@ -0,0 +1,27 @@
+From: Pavel Kalian <pavel at kalian.cz>
+Date: Sat, 8 Aug 2015 10:30:59 -0500
+Subject: base: Add dummy GetNAText().
+
+---
+ include/wx/curl/base.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/include/wx/curl/base.h b/include/wx/curl/base.h
+index f6f5a37..38db554 100644
+--- a/include/wx/curl/base.h
++++ b/include/wx/curl/base.h
+@@ -130,6 +130,14 @@ protected:
+     //       we cannot use wxDateTime::Now() there because once the event is constructed,
+     //       GetElapsedTime() needs to return always the same value!
+     wxDateTime m_dt;
++
++public:
++    static std::string GetNAText()
++    {
++        wxString s = _("Not available");
++        return std::string(s.mb_str());
++    }
++
+ };
+ 
+ 


=====================================
debian/patches/0015-wxcurl-Don-t-take-length-on-null-pointers.patch
=====================================
@@ -0,0 +1,25 @@
+From: Pavel Kalian <pavel at kalian.cz>
+Date: Sat, 8 Aug 2015 10:30:59 -0500
+Subject: wxcurl: Don't take length on null pointers.
+
+---
+ src/base.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/base.cpp b/src/base.cpp
+index f0e3011..0049fef 100644
+--- a/src/base.cpp
++++ b/src/base.cpp
+@@ -160,10 +160,11 @@ extern "C"
+         size_t iRetVal = 0;
+ 
+         wxCharBuffer* pStr = (wxCharBuffer*) pcharbuf;
+-        size_t len = strlen(*pStr);
++        size_t len = 0;
+ 
+         if(pStr)
+         {
++            len = strlen(*pStr);
+             if(len >= iRealSize)
+             {
+                 strncpy((char*)ptr, (const char*)(*pStr), iRealSize);


=====================================
debian/patches/0016-Add-missing-va_end.patch
=====================================
@@ -0,0 +1,22 @@
+From: Pavel Kalian <pavel at kalian.cz>
+Date: Sat, 8 Aug 2015 10:30:59 -0500
+Subject: Add missing va_end().
+
+---
+ src/base.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/base.cpp b/src/base.cpp
+index 0049fef..1863b8f 100644
+--- a/src/base.cpp
++++ b/src/base.cpp
+@@ -498,8 +498,8 @@ bool wxCurlBase::GetInfo(int info, ...) const
+     CURLcode res = CURLE_OK;
+     CURLINFO cInfo = (CURLINFO)info;
+     res = curl_easy_getinfo(m_pCURL, cInfo, pParam);
+-
+     DumpErrorIfNeed(res);
++    va_end(arg);
+     return (res == CURLE_OK);
+ }
+ 


=====================================
debian/patches/0017-base-Fix-constructor-initializers.patch
=====================================
@@ -0,0 +1,58 @@
+From: Pavel Kalian <pavel at kalian.cz>
+Date: Sat, 8 Aug 2015 10:30:59 -0500
+Subject: base: Fix constructor initializers.
+
+---
+ src/base.cpp | 21 ++++++++++++---------
+ 1 file changed, 12 insertions(+), 9 deletions(-)
+
+diff --git a/src/base.cpp b/src/base.cpp
+index 1863b8f..443f6ae 100644
+--- a/src/base.cpp
++++ b/src/base.cpp
+@@ -269,7 +269,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxCurlDownloadEvent, wxEvent);
+ 
+ wxCurlDownloadEvent::wxCurlDownloadEvent()
+ : wxCurlProgressBaseEvent(-1, wxCURL_DOWNLOAD_EVENT),
+-m_rDownloadNow(0.0), m_rDownloadTotal(0.0)
++  m_rDownloadTotal(0.0), m_rDownloadNow(0.0)
+ {
+ }
+ 
+@@ -304,7 +304,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxCurlUploadEvent, wxEvent);
+ 
+ wxCurlUploadEvent::wxCurlUploadEvent()
+ : wxCurlProgressBaseEvent(-1, wxCURL_UPLOAD_EVENT),
+-m_rUploadNow(0.0), m_rUploadTotal(0.0)
++  m_rUploadTotal(0.0), m_rUploadNow(0.0)
+ {
+ }
+ 
+@@ -400,17 +400,20 @@ wxCurlBase::wxCurlBase(const wxString& szURL /*= wxEmptyString*/,
+                     wxEvtHandler* pEvtHandler /*= NULL*/,
+                     int id /*= wxID_ANY*/,
+                     long flags /*=wxCURL_DEFAULT_FLAGS*/)
+-: m_szBaseURL(wxCURL_STRING2BUF(szURL)),
++ : m_pCURL(NULL),
+ m_bAbortHungTransfer(false),
+ m_szCurrFullURL(wxCURL_STRING2BUF(szURL)),
+ m_szUsername(wxCURL_STRING2BUF(szUserName)),
+ m_szPassword(wxCURL_STRING2BUF(szPassword)),
+-m_iHostPort(-1), m_iResponseCode(-1),
+-m_bUseProxy(false), m_iProxyPort(-1),
+-m_pCURL(NULL), m_pHeaders(NULL), 
+-m_pEvtHandler(pEvtHandler), m_nId(id),
+-m_nFlags(flags),
+-m_bVerbose(false)
++m_iHostPort(-1),
++m_iResponseCode(-1),
++m_pHeaders(NULL),
++m_bUseProxy(false),
++m_iProxyPort(-1),
++m_bVerbose(false),
++m_pEvtHandler(pEvtHandler),
++m_nId(id),
++m_nFlags(flags)
+ {
+     m_szDetailedErrorBuffer[0] = '\0';
+     m_progressCallback = wxcurl_evt_progress_func;


=====================================
debian/patches/0018-base-Update-standard-curl-options.patch
=====================================
@@ -0,0 +1,29 @@
+From: Pavel Kalian <pavel at kalian.cz>
+Date: Sat, 8 Aug 2015 10:30:59 -0500
+Subject: base: Update standard curl-options.
+
+---
+ src/base.cpp | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/base.cpp b/src/base.cpp
+index 443f6ae..1f78775 100644
+--- a/src/base.cpp
++++ b/src/base.cpp
+@@ -806,6 +806,16 @@ void wxCurlBase::SetCurlHandleToDefaults(const wxString& relativeURL)
+         SetOpt(CURLOPT_HEADERFUNCTION, wxcurl_header_func);
+         SetOpt(CURLOPT_WRITEHEADER, &m_szResponseHeader);
+         SetOpt(CURLOPT_ERRORBUFFER, m_szDetailedErrorBuffer);
++        SetOpt(CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0\r\n" \
++                    "Accept: application/xml,text/html,application/xhtml+xml;q=0.9,*/*;q=0.8\r\n" \
++                    "Connection: keep-alive"); //Pretend we are a normal browser
++        SetOpt(CURLOPT_FOLLOWLOCATION, 1L);
++#ifdef __WXMSW__
++        SetOpt(CURLOPT_CAINFO, "curl-ca-bundle.crt"); //Use our local certificate list on Windows
++        SetOpt(CURLOPT_SSL_VERIFYPEER, true);          // FIXME: Temporary until we get certificates working
++#endif
++        SetOpt(CURLOPT_ENCODING, "gzip,deflate"); //Save bandwidth by using compression
++
+ 
+         if(m_pEvtHandler && (m_nFlags & wxCURL_SEND_PROGRESS_EVENTS))
+         {


=====================================
debian/patches/0019-base-Use-std-string-instead-of-wxstring.patch
=====================================
@@ -0,0 +1,588 @@
+From: Pavel Kalian <pavel at kalian.cz>
+Date: Sat, 8 Aug 2015 10:30:59 -0500
+Subject:  base: Use std::string instead of wxstring.
+
+---
+ include/wx/curl/base.h |  89 +++++++++++++++++++++-----------------
+ src/base.cpp           | 114 +++++++++++++++++++++++++++----------------------
+ 2 files changed, 113 insertions(+), 90 deletions(-)
+
+diff --git a/include/wx/curl/base.h b/include/wx/curl/base.h
+index 38db554..6ba3665 100644
+--- a/include/wx/curl/base.h
++++ b/include/wx/curl/base.h
+@@ -18,7 +18,8 @@
+ #ifdef WXMAKINGDLL_WXCURL
+     #define WXDLLIMPEXP_CURL WXEXPORT
+ #elif defined(WXUSINGDLL)
+-    #define WXDLLIMPEXP_CURL WXIMPORT
++//    #define WXDLLIMPEXP_CURL WXIMPORT
++    #define WXDLLIMPEXP_CURL
+ #else // not making nor using DLL
+     #define WXDLLIMPEXP_CURL
+ 
+@@ -63,7 +64,7 @@ class WXDLLIMPEXP_CURL wxCurlProgressBaseEvent : public wxEvent
+ {
+ public:
+     wxCurlProgressBaseEvent(int id, wxEventType type,
+-                        wxCurlBase *p = NULL, const wxString &url = wxEmptyString)
++                        wxCurlBase *p = NULL, const std::string &url = "")
+         : wxEvent(id, type) { m_pCURL = p; m_szURL = url; m_dt = wxDateTime::Now(); }
+ 
+ 
+@@ -83,7 +84,6 @@ public:     // misc getters
+     virtual double GetSpeed() const
+         { return GetTransferredBytes()/GetElapsedTime().GetSeconds().ToDouble(); }
+ 
+-
+ public:     // wxTimeSpan getters
+ 
+     //! Returns the time elapsed since the beginning of the download up
+@@ -100,18 +100,24 @@ public:     // wxTimeSpan getters
+ public:     // wxString getters
+ 
+     //! Returns the URL you are transfering from.
+-    wxString GetURL() const { return m_szURL; }
++    std::string GetURL() const { return m_szURL; }
+ 
+     //! Returns the current download/upload speed in a human readable format.
+-    wxString GetHumanReadableSpeed(const wxString &inv = _("Not available"), int prec = 1) const;
++    std::string GetHumanReadableSpeed(const std::string &inv = GetNAText(), int prec = 1) const;
+ 
+     //! Returns the total bytes to download in a human-readable format.
+-    wxString GetHumanReadableTotalBytes(const wxString &inv = _("Not available"), int prec = 1) const
+-        { return wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)GetTotalBytes()), inv, prec); }
++    std::string GetHumanReadableTotalBytes(const std::string &inv = GetNAText(), int prec = 1) const
++        {
++            wxString s(inv.c_str(), wxConvUTF8);
++            return std::string(wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)GetTotalBytes()), s, prec).mb_str());
++        }
+ 
+     //! Returns the currently transferred bytes in a human-readable format.
+-    wxString GetHumanReadableTransferredBytes(const wxString &inv = _("Not available"), int prec = 1) const
+-        { return wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)GetTransferredBytes()), inv, prec); }
++    std::string GetHumanReadableTransferredBytes(const std::string &inv = GetNAText(), int prec = 1) const
++        {
++            wxString s(inv.c_str(), wxConvUTF8);
++            return std::string(wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)GetTransferredBytes()), s, prec).mb_str());
++        }
+ 
+ 
+ public:     // pure virtual functions
+@@ -124,7 +130,7 @@ public:     // pure virtual functions
+ 
+ protected:
+     wxCurlBase *m_pCURL;
+-    wxString m_szURL;
++    std::string m_szURL;
+ 
+     // NOTE: we need to store this date time to use it in GetElapsedTime:
+     //       we cannot use wxDateTime::Now() there because once the event is constructed,
+@@ -137,7 +143,6 @@ public:
+         wxString s = _("Not available");
+         return std::string(s.mb_str());
+     }
+-
+ };
+ 
+ 
+@@ -156,7 +161,7 @@ public:
+     wxCurlDownloadEvent();
+     wxCurlDownloadEvent(int id, wxCurlBase *originator,
+                         const double& rDownloadTotal, const double& rDownloadNow, 
+-                        const wxString& szURL = wxEmptyString);
++                        const std::string& szURL = "");
+     wxCurlDownloadEvent(const wxCurlDownloadEvent& event);
+ 
+     virtual wxEvent* Clone() const { return new wxCurlDownloadEvent(*this); }
+@@ -170,8 +175,11 @@ public:
+     double GetTotalBytes() const { return m_rDownloadTotal; }
+ 
+     //! Returns the currently downloaded bytes in a human-readable format.
+-    wxString GetHumanReadableDownloadedBytes(const wxString &inv = _("Not available"), int prec = 1) const
+-        { return wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)m_rDownloadNow), inv, prec); }
++    std::string GetHumanReadableDownloadedBytes(const std::string &inv = wxCurlProgressBaseEvent::GetNAText(), int prec = 1) const
++        {
++            wxString s(inv.c_str(), wxConvUTF8);
++            return std::string(wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)m_rDownloadNow), s, prec).mb_str());
++        }
+ 
+ 
+ protected:
+@@ -201,7 +209,7 @@ public:
+     wxCurlUploadEvent();
+     wxCurlUploadEvent(int id, wxCurlBase *originator,
+                         const double& rUploadTotal, const double& rUploadNow, 
+-                        const wxString& szURL = wxEmptyString);
++                        const std::string& szURL = "");
+     wxCurlUploadEvent(const wxCurlUploadEvent& event);
+ 
+     virtual wxEvent* Clone() const { return new wxCurlUploadEvent(*this); }
+@@ -215,8 +223,11 @@ public:
+     double GetTotalBytes() const { return m_rUploadTotal; }
+ 
+     //! Returns the currently uploaded bytes in a human-readable format.
+-    wxString GetHumanReadableUploadedBytes(const wxString &inv = _("Not available"), int prec = 1) const
+-        { return wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)m_rUploadNow), inv, prec); }
++    std::string GetHumanReadableUploadedBytes(const std::string &inv = wxCurlProgressBaseEvent::GetNAText(), int prec = 1) const
++        {
++            wxString s(inv.c_str(), wxConvUTF8);
++            return std::string(wxFileName::GetHumanReadableSize(wxULongLong((unsigned long)m_rUploadNow), s, prec).mb_str());
++        }
+ 
+ protected:
+     double m_rUploadTotal, m_rUploadNow;
+@@ -245,16 +256,16 @@ class WXDLLIMPEXP_CURL wxCurlBeginPerformEvent : public wxEvent
+ {
+ public:
+     wxCurlBeginPerformEvent();
+-    wxCurlBeginPerformEvent(int id, const wxString& szURL);
++    wxCurlBeginPerformEvent(int id, const std::string& szURL);
+     wxCurlBeginPerformEvent(const wxCurlBeginPerformEvent& event);
+ 
+     virtual wxEvent* Clone() const { return new wxCurlBeginPerformEvent(*this); }
+ 
+     //! Returns the URL you are going to transfering from/to.
+-    wxString GetURL() const { return m_szURL; }
++    std::string GetURL() const { return m_szURL; }
+ 
+ protected:
+-    wxString m_szURL;
++    std::string m_szURL;
+ 
+ private:
+     DECLARE_DYNAMIC_CLASS(wxCurlBeginPerformEvent);
+@@ -280,13 +291,13 @@ class WXDLLIMPEXP_CURL wxCurlEndPerformEvent : public wxEvent
+ {
+ public:
+     wxCurlEndPerformEvent();
+-    wxCurlEndPerformEvent(int id, const wxString& szURL, const long& iResponseCode);
++    wxCurlEndPerformEvent(int id, const std::string& szURL, const long& iResponseCode);
+     wxCurlEndPerformEvent(const wxCurlEndPerformEvent& event);
+ 
+     virtual wxEvent* Clone() const { return new wxCurlEndPerformEvent(*this); }
+ 
+     //! Returns the URL you are going to transfering from/to.
+-    wxString GetURL() const { return m_szURL; }
++    std::string GetURL() const { return m_szURL; }
+ 
+     //! Returns the response code for the operation.
+     long GetResponseCode() const { return m_iResponseCode; }
+@@ -295,7 +306,7 @@ public:
+     bool IsSuccessful() const { return ((m_iResponseCode > 199) && (m_iResponseCode < 300)); }
+ 
+ protected:
+-    wxString	m_szURL;
++    std::string	m_szURL;
+     long		m_iResponseCode;
+ 
+ private:
+@@ -404,7 +415,6 @@ public:
+     //! Is the underlying libCURL handle valid?
+     bool IsOk() const { return m_pCURL != NULL; }
+ 
+-
+     // Member Data Access Methods (MDA)
+ 
+     //! Sets the event handler to which the wxCurlDownloadEvent, wxCurlBeginPerformEvent and
+@@ -425,13 +435,13 @@ public:
+     //! Sets the base URL. This allows you to specify a 'base' URL if you
+     //! are performing multiple actions.
+     void		SetBaseURL(const wxString& szBaseURL);
+-    wxString	GetBaseURL() const;
++    std::string	GetBaseURL() const;
+ 
+     //! Sets the current URL. The 'base url' will be prepended to the given string.
+     void        SetURL(const wxString &szRelativeURL);
+ 
+     //! Returns the current 'full' URL. I.e. the real URL being used for the transfer.
+-    wxString    GetURL() const;
++    std::string    GetURL() const;
+ 
+     //! Sets the host Port.  This allows you to specify a specific (non-
+     //! default port) if you like.  The value -1 means that the default port
+@@ -442,16 +452,16 @@ public:
+     //! Sets the Username. If no username is
+     //! needed, simply assign an empty string (which is the default).
+     void		SetUsername(const wxString& szUsername);
+-    wxString	GetUsername() const;
++    std::string	GetUsername() const;
+ 
+     //! Sets the Password. If no password is
+     //! needed, simply assign an empty string (which is the default).
+     void		SetPassword(const wxString& szPassword);
+-    wxString	GetPassword() const;
++    std::string	GetPassword() const;
+ 
+     //! Returns the header of the response.
+-    wxString	GetResponseHeader() const;
+-    wxString	GetResponseBody() const;		// May only contain data on NON-GET calls.
++    std::string	GetResponseHeader() const;
++    std::string	GetResponseBody() const;		// May only contain data on NON-GET calls.
+     long		GetResponseCode() const;
+ 
+     //! Should the proxy be used?
+@@ -460,15 +470,15 @@ public:
+ 
+     //! Sets proxy host.
+     void		SetProxyHost(const wxString& szProxyHost);
+-    wxString	GetProxyHost() const;
++    std::string	GetProxyHost() const;
+ 
+     //! Sets the username for proxy access (if needed).
+     void		SetProxyUsername(const wxString& szProxyUsername);
+-    wxString	GetProxyUsername() const;
++    std::string	GetProxyUsername() const;
+ 
+     //! Sets the password for proxy access (if needed).
+     void		SetProxyPassword(const wxString& szProxyPassword);
+-    wxString	GetProxyPassword() const;
++    std::string	GetProxyPassword() const;
+ 
+     //! Sets the port for proxy access.
+     void		SetProxyPort(const long& iProxyPort);
+@@ -487,12 +497,12 @@ public:
+     bool		GetVerboseString(wxString& szStream) const;
+ 
+     //! Returns a generic, short string describing the last occurred error.
+-    wxString    GetErrorString() const;
++    std::string    GetErrorString() const;
+ 
+     //! Returns a short string with a detailed description of last occurred error.
+     //! This is typically something technical which you may want to hide from the
+     //! end users of your application (and e.g. show only in log files).
+-    wxString    GetDetailedErrorString() const;
++    std::string    GetDetailedErrorString() const;
+ 
+ 
+     // Static LibCURL Initialization Methods - Call At Program Init and Close...
+@@ -507,10 +517,10 @@ public:
+     // Static LibCURL Utility Methods
+ 
+     static wxDateTime GetDateFromString(const wxString& szDate);
+-    static wxString GetURLEncodedString(const wxString& szData);
+-    static wxString GetStringFromURLEncoded(const wxString& szData);
++    static std::string GetURLEncodedString(const wxString& szData);
++    static std::string GetStringFromURLEncoded(const wxString& szData);
+ 
+-    static wxString GetCURLVersion();
++    static std::string GetCURLVersion();
+ 
+ 
+ protected:      // protected utils used by wxCurl*Thread classes
+@@ -553,10 +563,9 @@ protected:
+ 
+     // The internal pointer to the libCURL session.
+     CURL*                   m_pCURL;
+-
+-
+ 	// Flag for terminating a possibly hung transfer
+ 	bool                    m_bAbortHungTransfer;
++
+     // libCURL <-> wxString conversions helpers (see below)
+ 
+     #define wxCURL_BUF2STRING(x)         wxString((const char*)(x), wxConvLibc)
+diff --git a/src/base.cpp b/src/base.cpp
+index 1f78775..d5ca41f 100644
+--- a/src/base.cpp
++++ b/src/base.cpp
+@@ -60,6 +60,7 @@ extern "C"
+                 wxCurlDownloadEvent evt(curl->GetId(), curl, rUlTotal, rUlNow, curl->GetURL());
+                 wxPostEvent(curl->GetEvtHandler(), evt);
+             }
++
+             if ( curl->GetAbort() )
+                 res = 1;    // This will cause curl_easy_perform() to return CURLE_WRITE_ERROR immediately
+         }
+@@ -244,14 +245,15 @@ wxTimeSpan wxCurlProgressBaseEvent::GetEstimatedRemainingTime() const
+     return wxTimeSpan(0);       // probably est==0 because GetTotalBytes()==0
+ }
+ 
+-wxString wxCurlProgressBaseEvent::GetHumanReadableSpeed(const wxString &invalid, int precision) const
++std::string wxCurlProgressBaseEvent::GetHumanReadableSpeed(const std::string &invalid, int precision) const
+ {
+     double speed = GetSpeed();
+     if (speed == 0 || wxIsNaN(speed))
+         return invalid;
+ 
+     wxULongLong ull((wxULongLong_t)speed);
+-    return wxFileName::GetHumanReadableSize(ull, invalid, precision) + wxS("/s");
++    wxString s(invalid.c_str(), wxConvUTF8);
++    return std::string( wxFileName::GetHumanReadableSize(ull, s, precision).mb_str() ) + "/s";
+ }
+ 
+ 
+@@ -275,7 +277,7 @@ wxCurlDownloadEvent::wxCurlDownloadEvent()
+ 
+ wxCurlDownloadEvent::wxCurlDownloadEvent(int id, wxCurlBase *originator,
+                                         const double& rDownloadTotal, const double& rDownloadNow, 
+-                                        const wxString& szURL /*= wxEmptyString*/)
++                                        const std::string& szURL /*= wxEmptyString*/)
+ : wxCurlProgressBaseEvent(id, wxCURL_DOWNLOAD_EVENT, originator, szURL),
+ m_rDownloadTotal(rDownloadTotal), m_rDownloadNow(rDownloadNow)
+ {
+@@ -310,7 +312,7 @@ wxCurlUploadEvent::wxCurlUploadEvent()
+ 
+ wxCurlUploadEvent::wxCurlUploadEvent(int id, wxCurlBase *originator,
+                                         const double& rUploadTotal, const double& rUploadNow, 
+-                                        const wxString& szURL /*= wxEmptyString*/)
++                                        const std::string& szURL /*= wxEmptyString*/)
+ : wxCurlProgressBaseEvent(id, wxCURL_UPLOAD_EVENT, originator, szURL),
+ m_rUploadTotal(rUploadTotal), m_rUploadNow(rUploadNow)
+ {
+@@ -342,7 +344,7 @@ wxCurlBeginPerformEvent::wxCurlBeginPerformEvent()
+ {
+ }
+ 
+-wxCurlBeginPerformEvent::wxCurlBeginPerformEvent(int id, const wxString& szURL)
++wxCurlBeginPerformEvent::wxCurlBeginPerformEvent(int id, const std::string& szURL)
+ : wxEvent(id, wxCURL_BEGIN_PERFORM_EVENT),
+ m_szURL(szURL)
+ {
+@@ -372,7 +374,7 @@ m_iResponseCode(0)
+ {
+ }
+ 
+-wxCurlEndPerformEvent::wxCurlEndPerformEvent(int id, const wxString& szURL, const long& iResponseCode)
++wxCurlEndPerformEvent::wxCurlEndPerformEvent(int id, const std::string& szURL, const long& iResponseCode)
+ : wxEvent(id, wxCURL_END_PERFORM_EVENT),
+ m_szURL(szURL),
+ m_iResponseCode(iResponseCode)
+@@ -501,6 +503,7 @@ bool wxCurlBase::GetInfo(int info, ...) const
+     CURLcode res = CURLE_OK;
+     CURLINFO cInfo = (CURLINFO)info;
+     res = curl_easy_getinfo(m_pCURL, cInfo, pParam);
++
+     DumpErrorIfNeed(res);
+     va_end(arg);
+     return (res == CURLE_OK);
+@@ -512,7 +515,8 @@ bool wxCurlBase::Perform()
+ 
+     if((m_nFlags & wxCURL_SEND_BEGINEND_EVENTS) && m_pEvtHandler)
+     {
+-        wxCurlBeginPerformEvent bgnEvent(m_nId, wxCURL_BUF2STRING(m_szCurrFullURL));
++        wxString s = wxCURL_BUF2STRING(m_szCurrFullURL);
++        wxCurlBeginPerformEvent bgnEvent(m_nId, std::string(s.mb_str()));
+         wxPostEvent(m_pEvtHandler, bgnEvent);
+     }
+ 
+@@ -528,7 +532,8 @@ bool wxCurlBase::Perform()
+ 
+     if((m_nFlags & wxCURL_SEND_BEGINEND_EVENTS) && m_pEvtHandler)
+     {
+-        wxCurlEndPerformEvent endEvent(m_nId, wxCURL_BUF2STRING(m_szCurrFullURL), m_iResponseCode);
++        wxString s = wxCURL_BUF2STRING(m_szCurrFullURL);
++        wxCurlEndPerformEvent endEvent(m_nId, std::string(s.mb_str()), m_iResponseCode);
+         wxPostEvent(m_pEvtHandler, endEvent);
+     }
+ 
+@@ -619,9 +624,10 @@ void wxCurlBase::SetBaseURL(const wxString& szBaseURL)
+     m_szBaseURL = wxCURL_STRING2BUF(szBaseURL);
+ }
+ 
+-wxString wxCurlBase::GetBaseURL() const
++std::string wxCurlBase::GetBaseURL() const
+ {
+-    return wxCURL_BUF2STRING(m_szBaseURL);
++    wxString s = wxCURL_BUF2STRING(m_szBaseURL);
++    return std::string(s.mb_str());
+ }
+ 
+ void wxCurlBase::SetURL(const wxString& szRelativeURL)
+@@ -630,9 +636,10 @@ void wxCurlBase::SetURL(const wxString& szRelativeURL)
+     m_szCurrFullURL = wxCURL_STRING2BUF(str);
+ }
+ 
+-wxString wxCurlBase::GetURL() const
++std::string wxCurlBase::GetURL() const
+ { 
+-    return wxCURL_BUF2STRING(m_szCurrFullURL);
++    wxString s = wxCURL_BUF2STRING(m_szCurrFullURL);
++    return std::string(s.mb_str());
+ }
+ 
+ void wxCurlBase::SetPort(const long& iPort)
+@@ -650,9 +657,10 @@ void wxCurlBase::SetUsername(const wxString& szUsername)
+     m_szUsername = wxCURL_STRING2BUF(szUsername);
+ }
+ 
+-wxString wxCurlBase::GetUsername() const
++std::string wxCurlBase::GetUsername() const
+ {
+-    return wxCURL_BUF2STRING(m_szUsername);
++    wxString s = wxCURL_BUF2STRING(m_szUsername);
++    return std::string(s.mb_str());
+ }
+ 
+ void wxCurlBase::SetPassword(const wxString& szPassword)
+@@ -660,19 +668,22 @@ void wxCurlBase::SetPassword(const wxString& szPassword)
+     m_szPassword = wxCURL_STRING2BUF(szPassword);
+ }
+ 
+-wxString wxCurlBase::GetPassword() const
++std::string wxCurlBase::GetPassword() const
+ {
+-    return wxCURL_BUF2STRING(m_szPassword);
++    wxString s = wxCURL_BUF2STRING(m_szPassword);
++    return std::string(s.mb_str());
+ }
+ 
+-wxString wxCurlBase::GetResponseHeader() const
++std::string wxCurlBase::GetResponseHeader() const
+ {
+-    return wxCURL_BUF2STRING(m_szResponseHeader);
++    wxString s = wxCURL_BUF2STRING(m_szResponseHeader);
++    return std::string(s.mb_str());
+ }
+ 
+-wxString wxCurlBase::GetResponseBody() const
++std::string wxCurlBase::GetResponseBody() const
+ {
+-    return wxCURL_BUF2STRING(m_szResponseBody);
++    wxString s = wxCURL_BUF2STRING(m_szResponseBody);
++    return std::string(s.mb_str());
+ }
+ 
+ long wxCurlBase::GetResponseCode() const
+@@ -680,14 +691,16 @@ long wxCurlBase::GetResponseCode() const
+     return m_iResponseCode;
+ }
+ 
+-wxString wxCurlBase::GetDetailedErrorString() const
++std::string wxCurlBase::GetDetailedErrorString() const
+ {
+-    return wxString((const char*)m_szDetailedErrorBuffer, wxConvLibc);
++    wxString s = wxString((const char*)m_szDetailedErrorBuffer, wxConvLibc);
++    return std::string(s.mb_str());
+ }
+ 
+-wxString wxCurlBase::GetErrorString() const
++std::string wxCurlBase::GetErrorString() const
+ {
+-    return wxCURL_BUF2STRING(m_szLastError);
++    wxString s = wxCURL_BUF2STRING(m_szLastError);
++    return std::string(s.mb_str());
+ }
+ 
+ void wxCurlBase::UseProxy(const bool& bUseProxy)
+@@ -705,19 +718,10 @@ void wxCurlBase::SetProxyHost(const wxString& szProxyHost)
+     m_szProxyHost = wxCURL_STRING2BUF(szProxyHost);
+ }
+ 
+-void wxCurlBase::SetAbort(bool a)
+-{
+-    m_bAbortHungTransfer = a;
+-}
+-
+-bool wxCurlBase::GetAbort() const
+-{
+-    return m_bAbortHungTransfer;
+-}
+-
+-wxString wxCurlBase::GetProxyHost() const
++std::string wxCurlBase::GetProxyHost() const
+ {
+-    return wxCURL_BUF2STRING(m_szProxyHost);
++    wxString s = wxCURL_BUF2STRING(m_szProxyHost);
++    return std::string(s.mb_str());
+ }
+ 
+ void wxCurlBase::SetProxyUsername(const wxString& szProxyUsername)
+@@ -725,9 +729,10 @@ void wxCurlBase::SetProxyUsername(const wxString& szProxyUsername)
+     m_szProxyUsername = wxCURL_STRING2BUF(szProxyUsername);
+ }
+ 
+-wxString wxCurlBase::GetProxyUsername() const
++std::string wxCurlBase::GetProxyUsername() const
+ {
+-    return wxCURL_BUF2STRING(m_szProxyUsername);
++    wxString s = wxCURL_BUF2STRING(m_szProxyUsername);
++    return std::string(s.mb_str());
+ }
+ 
+ void wxCurlBase::SetProxyPassword(const wxString& szProxyPassword)
+@@ -735,9 +740,10 @@ void wxCurlBase::SetProxyPassword(const wxString& szProxyPassword)
+     m_szProxyPassword = wxCURL_STRING2BUF(szProxyPassword);
+ }
+ 
+-wxString wxCurlBase::GetProxyPassword() const
++std::string wxCurlBase::GetProxyPassword() const
+ {
+-    return wxCURL_BUF2STRING(m_szProxyPassword);
++    wxString s = wxCURL_BUF2STRING(m_szProxyPassword);
++    return std::string(s.mb_str());
+ }
+ 
+ void wxCurlBase::SetProxyPort(const long& iProxyPort)
+@@ -788,6 +794,15 @@ bool wxCurlBase::GetVerboseString(wxString& szStream) const
+     return false;
+ }
+ 
++void wxCurlBase::SetAbort(bool a)
++{
++    m_bAbortHungTransfer = a;
++}
++
++bool wxCurlBase::GetAbort() const
++{
++    return m_bAbortHungTransfer;
++}
+ //////////////////////////////////////////////////////////////////////
+ // Helper Methods
+ //////////////////////////////////////////////////////////////////////
+@@ -812,10 +827,9 @@ void wxCurlBase::SetCurlHandleToDefaults(const wxString& relativeURL)
+         SetOpt(CURLOPT_FOLLOWLOCATION, 1L);
+ #ifdef __WXMSW__
+         SetOpt(CURLOPT_CAINFO, "curl-ca-bundle.crt"); //Use our local certificate list on Windows
+-        SetOpt(CURLOPT_SSL_VERIFYPEER, true);          // FIXME: Temporary until we get certificates working
++        SetOpt(CURLOPT_SSL_VERIFYPEER, true);		// FIXME: Temporary until we get certificates working
+ #endif
+         SetOpt(CURLOPT_ENCODING, "gzip,deflate"); //Save bandwidth by using compression
+-
+ 
+         if(m_pEvtHandler && (m_nFlags & wxCURL_SEND_PROGRESS_EVENTS))
+         {
+@@ -936,7 +950,7 @@ wxDateTime wxCurlBase::GetDateFromString(const wxString& szDate)
+     return wxDateTime(curl_getdate((const char*)(szDate.c_str()), &now));
+ }
+ 
+-wxString wxCurlBase::GetURLEncodedString(const wxString& szData)
++std::string wxCurlBase::GetURLEncodedString(const wxString& szData)
+ {
+     char* pszRetVal = curl_escape((const char*)(szData.c_str()), szData.Len());
+ 
+@@ -946,13 +960,13 @@ wxString wxCurlBase::GetURLEncodedString(const wxString& szData)
+ 
+         curl_free(pszRetVal);
+ 
+-        return szRetVal;
++        return std::string(szRetVal.mb_str());
+     }
+ 
+-    return wxEmptyString;
++    return "";
+ }
+ 
+-wxString wxCurlBase::GetStringFromURLEncoded(const wxString& szData)
++std::string wxCurlBase::GetStringFromURLEncoded(const wxString& szData)
+ {
+     char* pszRetVal = curl_unescape((const char*)(szData.c_str()), szData.Len());
+ 
+@@ -962,13 +976,13 @@ wxString wxCurlBase::GetStringFromURLEncoded(const wxString& szData)
+ 
+         curl_free(pszRetVal);
+ 
+-        return szRetVal;
++        return std::string(szRetVal.mb_str());
+     }
+ 
+-    return wxEmptyString;
++    return "";
+ }
+ 
+-wxString wxCurlBase::GetCURLVersion()
++std::string wxCurlBase::GetCURLVersion()
+ {
+-    return wxString(curl_version(), wxConvUTF8);
++    return std::string(curl_version());
+ }


=====================================
debian/patches/series
=====================================
@@ -8,6 +8,12 @@
 0008-Correct-numerous-wx-alignment-traps.patch
 0009-curl-base-relative-URL-was-unusable.patch
 0010-base-Fix-undefined-behaviour-in-va_start.patch
-0011-base-use-wxstring-return-values-instead-of-std-strin.patch
-0012-Threads-corner-cases.patch
-0013-Makefile.in-Add-target-writing-library-l-definition.patch
+0011-Threads-corner-cases.patch
+0012-Makefile.in-Add-target-writing-library-l-definition.patch
+0013-base-Add-SetAbort-GetAbort-handling-hung-transfers.patch
+0014-base-Add-dummy-GetNAText.patch
+0015-wxcurl-Don-t-take-length-on-null-pointers.patch
+0016-Add-missing-va_end.patch
+0017-base-Fix-constructor-initializers.patch
+0018-base-Update-standard-curl-options.patch
+0019-base-Use-std-string-instead-of-wxstring.patch



View it on GitLab: https://salsa.debian.org/debian-gis-team/wxcurl/compare/52c09d5db068e032e1f5d2b8aa0d4271058b9b32...272b3d2ff48945a272a69755a98fac6dceb7d528

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/wxcurl/compare/52c09d5db068e032e1f5d2b8aa0d4271058b9b32...272b3d2ff48945a272a69755a98fac6dceb7d528
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20180930/4128b725/attachment-0001.html>


More information about the Pkg-grass-devel mailing list