wininet: Remove redundant CrLf variables.
This commit is contained in:
parent
bc9e214f6f
commit
f7e56d19c4
|
@ -74,6 +74,7 @@ static const WCHAR szProxy_Authorization[] = { 'P','r','o','x','y','-','A','u','
|
|||
static const WCHAR szStatus[] = { 'S','t','a','t','u','s',0 };
|
||||
static const WCHAR szKeepAlive[] = {'K','e','e','p','-','A','l','i','v','e',0};
|
||||
static const WCHAR szGET[] = { 'G','E','T', 0 };
|
||||
static const WCHAR szCrLf[] = {'\r','\n', 0};
|
||||
|
||||
#define MAXHOSTNAME 100
|
||||
#define MAX_FIELD_VALUE_LEN 256
|
||||
|
@ -256,7 +257,6 @@ static LPWSTR HTTP_BuildHeaderRequestString( LPWININETHTTPREQW lpwhr, LPCWSTR ve
|
|||
LPWSTR p;
|
||||
|
||||
static const WCHAR szSpace[] = { ' ',0 };
|
||||
static const WCHAR szcrlf[] = {'\r','\n', 0};
|
||||
static const WCHAR szColon[] = { ':',' ',0 };
|
||||
static const WCHAR sztwocrlf[] = {'\r','\n','\r','\n', 0};
|
||||
|
||||
|
@ -277,7 +277,7 @@ static LPWSTR HTTP_BuildHeaderRequestString( LPWININETHTTPREQW lpwhr, LPCWSTR ve
|
|||
{
|
||||
if (lpwhr->pCustHeaders[i].wFlags & HDR_ISREQUEST)
|
||||
{
|
||||
req[n++] = szcrlf;
|
||||
req[n++] = szCrLf;
|
||||
req[n++] = lpwhr->pCustHeaders[i].lpszField;
|
||||
req[n++] = szColon;
|
||||
req[n++] = lpwhr->pCustHeaders[i].lpszValue;
|
||||
|
@ -2189,7 +2189,6 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev
|
|||
LPWSTR headers;
|
||||
DWORD len = 0;
|
||||
BOOL ret = FALSE;
|
||||
static const WCHAR CRLF[] = {'\r','\n',0};
|
||||
|
||||
if (request_only)
|
||||
headers = HTTP_BuildHeaderRequestString(lpwhr, lpwhr->lpszVerb, lpwhr->lpszPath, lpwhr->lpszVersion);
|
||||
|
@ -2211,8 +2210,8 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev
|
|||
memcpy(lpBuffer, headers, len + sizeof(WCHAR));
|
||||
else
|
||||
{
|
||||
len = strlenW(CRLF) * sizeof(WCHAR);
|
||||
memcpy(lpBuffer, CRLF, sizeof(CRLF));
|
||||
len = strlenW(szCrLf) * sizeof(WCHAR);
|
||||
memcpy(lpBuffer, szCrLf, sizeof(szCrLf));
|
||||
}
|
||||
TRACE("returning data: %s\n", debugstr_wn(lpBuffer, len / sizeof(WCHAR)));
|
||||
ret = TRUE;
|
||||
|
@ -2225,7 +2224,6 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev
|
|||
}
|
||||
case HTTP_QUERY_RAW_HEADERS:
|
||||
{
|
||||
static const WCHAR szCrLf[] = {'\r','\n',0};
|
||||
LPWSTR * ppszRawHeaderLines = HTTP_Tokenize(lpwhr->lpszRawHeaders, szCrLf);
|
||||
DWORD i, size = 0;
|
||||
LPWSTR pszString = (WCHAR*)lpBuffer;
|
||||
|
@ -3145,14 +3143,13 @@ static void HTTP_InsertCookies(LPWININETHTTPREQW lpwhr)
|
|||
{
|
||||
int cnt = 0;
|
||||
static const WCHAR szCookie[] = {'C','o','o','k','i','e',':',' ',0};
|
||||
static const WCHAR szcrlf[] = {'\r','\n',0};
|
||||
|
||||
size = sizeof(szCookie) + nCookieSize * sizeof(WCHAR) + sizeof(szcrlf);
|
||||
size = sizeof(szCookie) + nCookieSize * sizeof(WCHAR) + sizeof(szCrLf);
|
||||
if ((lpszCookies = HeapAlloc(GetProcessHeap(), 0, size)))
|
||||
{
|
||||
cnt += sprintfW(lpszCookies, szCookie);
|
||||
InternetGetCookieW(lpszUrl, NULL, lpszCookies + cnt, &nCookieSize);
|
||||
strcatW(lpszCookies, szcrlf);
|
||||
strcatW(lpszCookies, szCrLf);
|
||||
|
||||
HTTP_HttpAddRequestHeadersW(lpwhr, lpszCookies, strlenW(lpszCookies), HTTP_ADDREQ_FLAG_ADD);
|
||||
HeapFree(GetProcessHeap(), 0, lpszCookies);
|
||||
|
@ -3722,7 +3719,6 @@ static INT HTTP_GetResponseHeaders(LPWININETHTTPREQW lpwhr, BOOL clear)
|
|||
DWORD buflen = MAX_REPLY_LEN;
|
||||
BOOL bSuccess = FALSE;
|
||||
INT rc = 0;
|
||||
static const WCHAR szCrLf[] = {'\r','\n',0};
|
||||
static const WCHAR szHundred[] = {'1','0','0',0};
|
||||
char bufferA[MAX_REPLY_LEN];
|
||||
LPWSTR status_code, status_text;
|
||||
|
|
Loading…
Reference in New Issue