Applied patch [ 1381420 ] wxHTTP Basic authentication support

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-01-19 10:28:22 +00:00
parent 175ec4c86d
commit dbccd1c261
2 changed files with 46 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
// Name: http.h
// Purpose: HTTP protocol
// Author: Guilhem Lavaux
// Modified by:
// Modified by: Simo Virokannas (authentication, Dec 2005)
// Created: August 1997
// RCS-ID: $Id$
// Copyright: (c) 1997, 1998 Guilhem Lavaux
@@ -43,6 +43,9 @@ public:
int GetResponse() { return m_http_response; }
virtual void SetUser(const wxString& user) { m_username = user; }
virtual void SetPassword(const wxString& passwd ) { m_password = passwd; }
protected:
enum wxHTTP_Req
{
@@ -58,6 +61,8 @@ protected:
void SendHeaders();
bool ParseHeaders();
wxString GenerateAuthString(const wxString& user, const wxString& pass) const;
// find the header in m_headers
wxHeaderIterator FindHeader(const wxString& header);
wxHeaderConstIterator FindHeader(const wxString& header) const;
@@ -72,6 +77,8 @@ protected:
wxSockAddress *m_addr;
wxString m_post_buf;
int m_http_response;
wxString m_username;
wxString m_password;
DECLARE_DYNAMIC_CLASS(wxHTTP)
DECLARE_PROTOCOL(wxHTTP)