29 сент. 2009 г.

The power of the OpenSource ("звезда в шоке")

WxWidgets 2.8.10

http.h

...
protected:
enum wxHTTP_Req
{
wxHTTP_GET,
wxHTTP_POST,
wxHTTP_HEAD
};
...

bool BuildRequest(const wxString& path, wxHTTP_Req req);
...



http.cpp


bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
{
const wxChar *request;

switch (req)
{
case wxHTTP_GET:
request = wxT("GET");
break;

case wxHTTP_POST:
request = wxT("POST");
if ( GetHeader( wxT("Content-Length") ).IsNull() )
SetHeader( wxT("Content-Length"), wxString::Format( wxT("%lu"), (unsigned long)m_post_buf.Len() ) );
break;

default:
return false;
}


Но ведь подумали же, твоюжтымать! есть такой метод "HEAD", есть.

P.S.

Name: src/common/http.cpp
Purpose: HTTP protocol
Author: Guilhem Lavaux
Modified by: Simo Virokannas (authentication, Dec 2005)
Created: August 1997
RCS-ID: $Id: http.cpp 44660 2007-03-07 23:07:17Z VZ $
Copyright: (c) 1997, 1998 Guilhem Lavaux
Licence: wxWindows licence

1 комментарий:

Begemot комментирует...

жесть :)))