request.h

来自「HttpSvr是一个用MFC编写的简单web server应用程序.」· C头文件 代码 · 共 55 行

H
55
字号
// Request.h : interface of the CRequest class
//
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1997-1998 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.

class CRequest : public CObject
{
	DECLARE_DYNCREATE(CRequest)

public:
	// Construction....
	CRequest();
	~CRequest();

	// Attributes....
	CString             m_strPathTranslated;
	CString             m_strPathInfo;
	CString             m_strHost; // host's address
	CString             m_strMethod; // GET, HEAD or POST
	CString             m_strURL;
	CString             m_strVersion; // HTTP/1.0
	CMapStringToString  m_mapHeaders;
	CByteArray          m_baBody;
	int                 m_cbBody;
	CString             m_strFullPath;
	DWORD               m_dwAttr;
	DWORD               m_dwExecute; // executable type
	CString             m_strArgs; // string after '?'
	UINT                m_uStatus;
	BOOL                m_bDone;
	UINT                m_cbSent;
	CTime               m_timeReq; // time of request

	// access routines....
	CString GetHeaderValue( CString strName );
	int     AddRef( void );
	int     Release( void );

	enum AppFlags {
		APP_NONE    = 0x0000,
		APP_EXECUTE = 0x0001,
		APP_CGI     = 0x0002,
		APP_ISAPI   = 0x0004 };

protected:
	int     m_nRefs;
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?