HttpAddResponseHeaderContentTypeTag

Appends a content type attribute to an HTTP Response Header and returns a flag indicating if a content length attribute is needed.

Syntax

    #include <httpexp.h>
    
    int HttpAddResponseHeaderContentTypeTag (
      HINTERNET    hndl,
      void        *pzExtName,
      int          szExtName,
      UINT32_PTR   pContentLengthFlag);
    

Parameters

hndl
(IN) Specifies the HTTP stack handle.
pzExtName
(IN) Points to a file name extension.
szExtName
(IN) Specifies, in bytes, the size of the file name extension.
pContentLengthFlag
(OUT) Points to a flag which, on successful completion, indicates whether the Content Length attribute is required:
  • TRUE—Content Length attribute is required.
  • FALSE—Content Length attribute is not required.

Return Values

If successful, returns 0. Otherwise, returns a nonzero error code.

Decimal

Name

Description

168

ERR_ACCESS_DENIED

The HttpSendResponseHeader function has already been called.

255

ERR_BAD_PARAMETER

Invalid handle.