winhttp: Implement WINHTTP_QUERY_STATUS_TEXT.

This commit is contained in:
Hans Leidekker 2010-03-05 12:29:49 +01:00 committed by Alexandre Julliard
parent 73d316c58d
commit bcc4040dcf
1 changed files with 18 additions and 0 deletions

View File

@ -670,6 +670,24 @@ static BOOL query_headers( request_t *request, DWORD level, LPCWSTR name, LPVOID
*buflen = len - sizeof(WCHAR);
return ret;
}
case WINHTTP_QUERY_STATUS_TEXT:
{
DWORD len = (strlenW( request->status_text ) + 1) * sizeof(WCHAR);
if (len > *buflen)
{
set_last_error( ERROR_INSUFFICIENT_BUFFER );
*buflen = len;
return FALSE;
}
else if (buffer)
{
strcpyW( buffer, request->status_text );
TRACE("returning string: %s\n", debugstr_w(buffer));
ret = TRUE;
}
*buflen = len - sizeof(WCHAR);
return ret;
}
default:
{
if (attr >= sizeof(attribute_table)/sizeof(attribute_table[0]) || !attribute_table[attr])