CHttpServer::DeleteAllClientHeaders Method  
 
BOOL DeleteAllClientHeaders(
  UINT nClientId,  
  UINT nHeaderType  
);

Delete all of the request or response headers for the specified client session.

Parameters

nClientId
Delete all of the request or response headers for the specified client session.
nHeaderType
Specifies the type of headers to delete. It may be one of the following values:
Constant Description
HTTP_HEADERS_REQUEST Delete all of the request headers that were provided by the client. Request header values provide additional information to the server about the type of request being made.
HTTP_HEADERS_RESPONSE Delete all of the response headers that were created by the server in response to a request made by the client. Response header values provide additional information to the client about the type of information that is being returned by the server.

Return Value

If the method succeeds, the return value is non-zero. If the client ID does not specify a valid client session, the method will return zero.

Remarks

The DeleteAllClientHeaders method is used to delete all of the request or response headers that were set as the result of the client issuing a request for a document or other resource. If this method is used to delete all of the response headers, the server will automatically generate a standard set of response headers when it returns the requested information to the client.

It is not necessary to call this method inside an OnDisconnect event handler to delete the header values that were set during the client session. This is done automatically when the client disconnects from the server.

Requirements

Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: cshtsv10.lib

See Also

DeleteClientHeader, SetClientHeader