wininet: Support setting the user agent string on handles returned by InternetOpen.

This commit is contained in:
Hans Leidekker 2012-05-18 09:29:57 +02:00 committed by Alexandre Julliard
parent 10d800b6b8
commit b1c4eecdc8
1 changed files with 4 additions and 0 deletions

View File

@ -906,6 +906,10 @@ static DWORD APPINFO_SetOption(object_header_t *hdr, DWORD option, void *buf, DW
ai->connect_timeout = *(ULONG*)buf;
return ERROR_SUCCESS;
case INTERNET_OPTION_USER_AGENT:
heap_free(ai->agent);
if (!(ai->agent = heap_strdupW(buf))) return ERROR_OUTOFMEMORY;
return ERROR_SUCCESS;
}
return INET_SetOption(hdr, option, buf, size);