When you create a custom logging module in Microsoft Internet Information Services (IIS) 6.0, and you use the
ILogPlugin::QueryExtraLoggingFields method to retrieve custom headers in the custom logging module, the
ILogPlugin::QueryExtraLoggingFields method retrieves header data that is incorrectly formatted.
Hotfix information
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
Prerequisites
No prerequisites are required.
Restart requirement
Stop IIS before you install this hotfix, and then restart IIS after you install this hotfix.
Note To stop IIS, click
Start, click
Run, type
iisreset /stop in the
Open box, and then click
OK. To start IIS after you stop it, click
Start, click
Run, type
iisreset /start in the
Open box, and then click
OK.
Hotfix replacement information
This hotfix does not replace any other hotfixes.
File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the
Time Zone tab in the Date and Time tool in Control Panel.
Microsoft Windows Server 2003
Date Time Version Size File name
-------------------------------------------------------
26-Aug-2004 22:08 6.0.3790.206 343,040 W3core.dll
26-Aug-2004 22:08 6.0.3790.206 9,728 W3comlog.dll
Microsoft Windows Server 2003, 64-Bit Edition
Date Time Version Size File name
-------------------------------------------------------------
26-Aug-2004 22:08 6.0.3790.206 21,504 W3comlog.dll IA64
26-Aug-2004 22:08 6.0.3790.206 951,808 W3core.dll IA64
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
The following is an example that demonstrates the problem that occurs when the custom headers are logged. In this example, A, B, and C are custom headers.
The IIS logging module processes header A, header B, and header C as follows:
STDMETHODIMP CLogMod::QueryExtraLoggingFields(PDWORD cbSize, PCHAR szParameters)
{
CHAR szExtraHeaders[] = "A:\0B:\0C:\0Host:\0\0";
if(sizeof(szExtraHeaders) > *cbSize)
{
*cbSize = sizeof(szExtraHeaders);
return ERROR_INSUFFICIENT_BUFFER;
}
memmove(szParameters, szExtraHeaders, sizeof(szExtraHeaders));
*cbSize = sizeof(szExtraHeaders);
return S_OK;
}
The headers are retrieved as follows:
STDMETHODIMP CLogMod::LogInformation(IInetLogInformation *pLogObj)
{
char szExtra[1024] = "";
CHAR *szHeaders;
DWORD dwSize;
memset(szExtra, 0, sizeof(szExtra));
dwSize = sizeof(szExtra);
szHeaders = pLogObj->GetExtraHTTPHeaders(szExtra, &dwSize);
…
}
In this example, if the client sends header A and header C, and does not send header B, the following incorrect string is returned:
Value_for_A\0Value_for_C\0\0
The correct string is listed as follows, where "\0" (without the quotation marks) is the value for the missing header B:
Value_for_A\0\0Value_for_C\0\0
For more information about the LogMod.exe sample IIS logging module, click the following article number to view the article in the Microsoft Knowledge Base:
259552Â
(http://kbalertz.com/Feedback.aspx?kbNumber=259552/
)
IIS logging module
For more information about the
ILogPlugin::QueryExtraLoggingFields
method, visit the following Microsoft Web site:
For more information about custom logging modules in IIS 6.0, visit the following Microsoft Web sites:
For more information about standard terminology that is used to describe Microsoft software updates, click the following article number to view the article in the Microsoft Knowledge Base:
824684Â
(http://kbalertz.com/Feedback.aspx?kbNumber=824684/
)
Description of the standard terminology that is used to describe Microsoft software updates