wininet: Fix the handling of Accept types passed into HttpOpenRequest

by properly coalescing all the types into the Accept header value,
rather than just adding the first.
This commit is contained in:
Rob Shearman 2007-01-07 12:53:50 +00:00 committed by Alexandre Julliard
parent 7e8ef764b8
commit a9c2cfa8d9
1 changed files with 2 additions and 1 deletions

View File

@ -1113,7 +1113,8 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
{
int i;
for(i=0;lpszAcceptTypes[i]!=NULL;i++)
HTTP_ProcessHeader(lpwhr, HTTP_ACCEPT, lpszAcceptTypes[i], HTTP_ADDHDR_FLAG_COALESCE_WITH_COMMA|HTTP_ADDHDR_FLAG_REQ|HTTP_ADDHDR_FLAG_ADD_IF_NEW);
HTTP_ProcessHeader(lpwhr, HTTP_ACCEPT, lpszAcceptTypes[i],
HTTP_ADDHDR_FLAG_COALESCE_WITH_COMMA|HTTP_ADDHDR_FLAG_REQ|(i == 0 ? HTTP_ADDHDR_FLAG_REPLACE : 0));
}
if (NULL == lpszVerb)