"Paul TBBle Hampson" Paul.Hampson@Pobox.com wrote:
if (strlenW(lpszStart)==0)
{
/* Skip 0-length headers */
lpszStart = lpszEnd;
bSuccess = TRUE;
continue;
}
Instead of 'if (strlenW(lpszStart)==0)' it's much simpler to do 'if (!*lpszStart)', and move the fix to HTTP_InterpretHttpHeader().
On Sat, Apr 25, 2009 at 11:52:20AM +0900, Dmitry Timoshkov wrote:
"Paul TBBle Hampson" Paul.Hampson@Pobox.com wrote:
if (strlenW(lpszStart)==0)
{
/* Skip 0-length headers */
lpszStart = lpszEnd;
bSuccess = TRUE;
continue;
}
Instead of 'if (strlenW(lpszStart)==0)' it's much simpler to do 'if (!*lpszStart)', and move the fix to HTTP_InterpretHttpHeader().
Looking at HTTP_InterpretHttpHeader, it should reject blank headers, otherwise it cannot produce sensible non-NULL results.
But certainly changing it to !*lpszStart works. Or in fact (*lpszStart == '\0') for consistency with the previous such testh.
I'll retest with this change, but I won't resubmit for now, in case you're going to tell me what I've missed about HTTP_InterpretHttpHeader. ^_^