Microsoft KB Archive/883661

From BetaArchive Wiki

Article ID: 883661

Article Last Modified on 12/3/2007



APPLIES TO

  • Microsoft Internet Information Services 6.0




SYMPTOMS

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.

RESOLUTION

Hotfix information

A supported hotfix is now 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 service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

Note If additional issues occur or 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. To create a separate service request, visit the following Microsoft Web site:

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

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

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


REFERENCES

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 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 Description of the standard terminology that is used to describe Microsoft software updates



Additional query words: iis fix

Keywords: kbbug kbfix kbqfe kbwinserv2003presp1fix kbhotfixserver KB883661