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
ec966048
Commit
ec966048
authored
Mar 15, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Release gzip_buffer when opening new connection.
parent
bc6786d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
http.c
dlls/wininet/http.c
+17
-8
No files found.
dlls/wininet/http.c
View file @
ec966048
...
...
@@ -258,7 +258,7 @@ static void init_gzip_stream(http_request_t *req)
gzip_stream_t
*
gzip_stream
;
int
index
,
zres
;
gzip_stream
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
gzip_stream_t
));
gzip_stream
=
heap_alloc_zero
(
sizeof
(
gzip_stream_t
));
gzip_stream
->
zstream
.
zalloc
=
wininet_zalloc
;
gzip_stream
->
zstream
.
zfree
=
wininet_zfree
;
...
...
@@ -276,6 +276,14 @@ static void init_gzip_stream(http_request_t *req)
HTTP_DeleteCustomHeader
(
req
,
index
);
}
static
void
release_gzip_stream
(
http_request_t
*
req
)
{
if
(
!
req
->
gzip_stream
->
end_of_data
)
inflateEnd
(
&
req
->
gzip_stream
->
zstream
);
heap_free
(
req
->
gzip_stream
);
req
->
gzip_stream
=
NULL
;
}
#else
static
void
init_gzip_stream
(
http_request_t
*
req
)
...
...
@@ -283,6 +291,10 @@ static void init_gzip_stream(http_request_t *req)
ERR
(
"gzip stream not supported, missing zlib.
\n
"
);
}
static
void
release_gzip_stream
(
http_request_t
*
req
)
{
}
#endif
/* set the request content length based on the headers */
...
...
@@ -1605,13 +1617,8 @@ static void HTTPREQ_Destroy(object_header_t *hdr)
HeapFree
(
GetProcessHeap
(),
0
,
request
->
custHeaders
[
i
].
lpszValue
);
}
#ifdef HAVE_ZLIB
if
(
request
->
gzip_stream
)
{
if
(
!
request
->
gzip_stream
->
end_of_data
)
inflateEnd
(
&
request
->
gzip_stream
->
zstream
);
HeapFree
(
GetProcessHeap
(),
0
,
request
->
gzip_stream
);
}
#endif
if
(
request
->
gzip_stream
)
release_gzip_stream
(
request
);
HeapFree
(
GetProcessHeap
(),
0
,
request
->
custHeaders
);
}
...
...
@@ -4997,6 +5004,8 @@ static DWORD HTTP_OpenConnection(http_request_t *request)
lend:
request
->
read_pos
=
request
->
read_size
=
0
;
request
->
read_chunked
=
FALSE
;
if
(
request
->
gzip_stream
)
release_gzip_stream
(
request
);
TRACE
(
"%d <--
\n
"
,
res
);
return
res
;
...
...
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