Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ca39a55e
Commit
ca39a55e
authored
Mar 02, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Don't use INTERNET_ReadFile in HTTP_DrainContent.
parent
352b4212
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
25 deletions
+22
-25
http.c
dlls/wininet/http.c
+21
-21
internet.c
dlls/wininet/internet.c
+1
-1
internet.h
dlls/wininet/internet.h
+0
-3
No files found.
dlls/wininet/http.c
View file @
ca39a55e
...
...
@@ -117,7 +117,7 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD
static
BOOL
HTTP_HandleRedirect
(
LPWININETHTTPREQW
lpwhr
,
LPCWSTR
lpszUrl
);
static
UINT
HTTP_DecodeBase64
(
LPCWSTR
base64
,
LPSTR
bin
);
static
BOOL
HTTP_VerifyValidHeader
(
LPWININETHTTPREQW
lpwhr
,
LPCWSTR
field
);
static
void
HTTP_DrainContent
(
WININETHTTPREQW
*
req
);
LPHTTPHEADERW
HTTP_GetHeader
(
LPWININETHTTPREQW
req
,
LPCWSTR
head
)
{
...
...
@@ -715,25 +715,6 @@ BOOL WINAPI HttpAddRequestHeadersA(HINTERNET hHttpRequest,
return
r
;
}
/* read any content returned by the server so that the connection can be
* reused */
static
void
HTTP_DrainContent
(
LPWININETHTTPREQW
lpwhr
)
{
DWORD
bytes_read
;
if
(
!
NETCON_connected
(
&
lpwhr
->
netConnection
))
return
;
if
(
lpwhr
->
dwContentLength
==
-
1
)
NETCON_close
(
&
lpwhr
->
netConnection
);
do
{
char
buffer
[
2048
];
if
(
!
INTERNET_ReadFile
(
&
lpwhr
->
hdr
,
buffer
,
sizeof
(
buffer
),
&
bytes_read
,
TRUE
))
return
;
}
while
(
bytes_read
);
}
/***********************************************************************
* HttpEndRequestA (WININET.@)
*
...
...
@@ -1410,7 +1391,7 @@ static DWORD HTTPREQ_SetOption(WININETHANDLEHEADER *hdr, DWORD option, void *buf
return
ERROR_INTERNET_INVALID_OPTION
;
}
DWORD
HTTPREQ_Read
(
WININETHTTPREQW
*
req
,
void
*
buffer
,
DWORD
size
,
DWORD
*
read
,
BOOL
sync
)
static
DWORD
HTTPREQ_Read
(
WININETHTTPREQW
*
req
,
void
*
buffer
,
DWORD
size
,
DWORD
*
read
,
BOOL
sync
)
{
int
bytes_read
;
...
...
@@ -1692,6 +1673,25 @@ lend:
return
handle
;
}
/* read any content returned by the server so that the connection can be
* reused */
static
void
HTTP_DrainContent
(
WININETHTTPREQW
*
req
)
{
DWORD
bytes_read
;
if
(
!
NETCON_connected
(
&
req
->
netConnection
))
return
;
if
(
req
->
dwContentLength
==
-
1
)
NETCON_close
(
&
req
->
netConnection
);
do
{
char
buffer
[
2048
];
if
(
HTTPREQ_Read
(
req
,
buffer
,
sizeof
(
buffer
),
&
bytes_read
,
TRUE
)
!=
ERROR_SUCCESS
)
return
;
}
while
(
bytes_read
);
}
static
const
WCHAR
szAccept
[]
=
{
'A'
,
'c'
,
'c'
,
'e'
,
'p'
,
't'
,
0
};
static
const
WCHAR
szAccept_Charset
[]
=
{
'A'
,
'c'
,
'c'
,
'e'
,
'p'
,
't'
,
'-'
,
'C'
,
'h'
,
'a'
,
'r'
,
's'
,
'e'
,
't'
,
0
};
static
const
WCHAR
szAccept_Encoding
[]
=
{
'A'
,
'c'
,
'c'
,
'e'
,
'p'
,
't'
,
'-'
,
'E'
,
'n'
,
'c'
,
'o'
,
'd'
,
'i'
,
'n'
,
'g'
,
0
};
...
...
dlls/wininet/internet.c
View file @
ca39a55e
...
...
@@ -1700,7 +1700,7 @@ BOOL WINAPI InternetWriteFile(HINTERNET hFile, LPCVOID lpBuffer,
}
BOOL
INTERNET_ReadFile
(
LPWININETHANDLEHEADER
lpwh
,
LPVOID
lpBuffer
,
static
BOOL
INTERNET_ReadFile
(
LPWININETHANDLEHEADER
lpwh
,
LPVOID
lpBuffer
,
DWORD
dwNumOfBytesToRead
,
LPDWORD
pdwNumOfBytesRead
,
BOOL
bWait
)
{
BOOL
retval
=
FALSE
;
...
...
dlls/wininet/internet.h
View file @
ca39a55e
...
...
@@ -378,9 +378,6 @@ DWORD INTERNET_GetLastError(void);
BOOL
INTERNET_AsyncCall
(
LPWORKREQUEST
lpWorkRequest
);
LPSTR
INTERNET_GetResponseBuffer
(
void
);
LPSTR
INTERNET_GetNextLine
(
INT
nSocket
,
LPDWORD
dwLen
);
BOOL
INTERNET_ReadFile
(
LPWININETHANDLEHEADER
lpwh
,
LPVOID
lpBuffer
,
DWORD
dwNumOfBytesToRead
,
LPDWORD
pdwNumOfBytesRead
,
BOOL
bWait
);
BOOLAPI
HTTP_HttpSendRequestW
(
LPWININETHTTPREQW
lpwhr
,
LPCWSTR
lpszHeaders
,
DWORD
dwHeaderLength
,
LPVOID
lpOptional
,
DWORD
dwOptionalLength
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment