Home Dashboard Directory Help

HTTP_QUERY_FLAG_REQUEST_HEADERS on CHttpFile::QueryInfo() asserts wrongly by Albert van Peppen



Sign in
to vote
Type: Bug
ID: 790975
Opened: 6/26/2013 1:44:42 AM
Access Restriction: Public
User(s) can reproduce this bug


The implementation of HTTP_QUERY_FLAG_REQUEST_HEADERS flag on the method 'BOOL CHttpFile::QueryInfo(DWORD dwInfoLevel, CString& str, LPDWORD lpdwIndex) const'
fails with an assertion in inet.cpp, line 2307 (VC 9.00), line 2321 (VC 11.00) or line 2319 (VC 12.00).

The reason is that the assert checks ASSERT(dwInfoLevel <= HTTP_QUERY_MAX) while HTTP_QUERY_FLAG_REQUEST_HEADERS is much larger than that.

Because it is an assert it only pops up in debug. But is still annoying..

In my application I use the HTTP_QUERY_RAW_HEADERS_CRLF | HTTP_QUERY_FLAG_REQUEST_HEADERS flags to retrieve the request headers.

My working environment is Windows 2008 Server (with service packs), Windows 7 Pro (SP1), Windows 8 Pro.
Development in C++ using both Visual Studio 2008 (All SPs and updates), Visual Studio 2012 (Update 4, RC3) and Visual Studio 2013 RTM.
Sign in to post a comment.
Posted by Albert van Peppen on 1/16/2014 at 12:32 AM
Does anybody tracks these items?
It has been quite a while now but it seems that nobody can give me an answer, positive or negative, whether this will be fixed soon?

It only occurres in _DEBUG but nonetheless it is very annoying during my development testing..
Posted by Albert van Peppen on 11/8/2013 at 12:27 AM
Just got the VS2013 RTM installed and to my surprise the ASSERT is back!?
After looking more in inet.cpp I found that an ASSERT is placed where it was removed in the VS2013 RC..

The VS2013 RC worked without a problem but the VS2013 RTM ASSERTs so I think this is a regression of some sort?

Also please consider fixing it in VS2012 Update 4 RTM?


Albert van Peppen
Posted by Albert van Peppen on 9/25/2013 at 9:07 PM
In VS2012 Update 4 RC3 this isn't fixed, possibly you can fix it in the Update 4 RTM?


Albert van Peppen
Posted by Albert van Peppen on 9/13/2013 at 3:56 AM
Hi Pat,

I can confirm that it is fixed in VS2013 / RC
Posted by Microsoft on 7/11/2013 at 2:43 PM
Hello Albert,

Thanks for the report. This invalid assertion has been removed from MFC for Visual Studio 2013 RTM.

Pat Brenner
Visual C++ Libraries Development
Posted by Albert van Peppen on 7/1/2013 at 6:48 AM
Just tested on VS2013 Preview; same issue :)

Best regards,

Albert van Peppen
Posted by Microsoft on 7/1/2013 at 1:41 AM
Thanks for your response.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Albert van Peppen on 6/26/2013 at 3:05 AM
A demo project is attached now.
It is a solution for VS2008 but can easily be converted to VS2012.

Best regards,

Albert van Peppen
Posted by Microsoft on 6/26/2013 at 2:13 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a demo project to demonstrate this issue so that we can conduct further research?

Please submit this information to us within 4 business days. We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 6/26/2013 at 1:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
Issue790975.zip 6/26/2013 67 KB