Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aaron Hill
wine
Commits
c2668776
Commit
c2668776
authored
7 months ago
by
Tom Helander
Committed by
Alexandre Julliard
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
http.sys: Skip clean up if HTTP_SEND_RESPONSE_FLAG_MORE_DATA is set.
parent
11f80ae3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/http.sys/http.c
+20
-15
20 additions, 15 deletions
dlls/http.sys/http.c
include/wine/http.h
+1
-0
1 addition, 0 deletions
include/wine/http.h
with
21 additions
and
15 deletions
dlls/http.sys/http.c
+
20
−
15
View file @
c2668776
...
...
@@ -638,7 +638,7 @@ static void receive_data(struct connection *conn)
if
(
conn
->
available
)
return
;
/* waiting for an HttpReceiveHttpRequest() call */
if
(
conn
->
req_id
!=
HTTP_NULL_ID
)
return
;
/* waiting for an HttpSendHttpResponse() call */
return
;
/* waiting for an HttpSendHttpResponse()
or HttpSendResponseEntityBody()
call */
TRACE
(
"Received %u bytes of data.
\n
"
,
len
);
...
...
@@ -1006,23 +1006,28 @@ static NTSTATUS http_send_response(struct request_queue *queue, IRP *irp)
{
if
(
send
(
conn
->
socket
,
response
->
buffer
,
response
->
len
,
0
)
>=
0
)
{
if
(
conn
->
content_len
)
/* Clean up the connection if we are not sending more response data. */
if
(
response
->
response_flags
!=
HTTP_SEND_RESPONSE_FLAG_MORE_DATA
)
{
/* Discard whatever entity body is left. */
memmove
(
conn
->
buffer
,
conn
->
buffer
+
conn
->
content_len
,
conn
->
len
-
conn
->
content_len
);
conn
->
len
-=
conn
->
content_len
;
if
(
conn
->
content_len
)
{
/* Discard whatever entity body is left. */
memmove
(
conn
->
buffer
,
conn
->
buffer
+
conn
->
content_len
,
conn
->
len
-
conn
->
content_len
);
conn
->
len
-=
conn
->
content_len
;
}
conn
->
queue
=
NULL
;
conn
->
req_id
=
HTTP_NULL_ID
;
WSAEventSelect
(
conn
->
socket
,
request_event
,
FD_READ
|
FD_CLOSE
);
/* We might have another request already in the buffer. */
if
(
parse_request
(
conn
)
<
0
)
{
WARN
(
"Failed to parse request; shutting down connection.
\n
"
);
send_400
(
conn
);
}
}
conn
->
queue
=
NULL
;
conn
->
req_id
=
HTTP_NULL_ID
;
WSAEventSelect
(
conn
->
socket
,
request_event
,
FD_READ
|
FD_CLOSE
);
irp
->
IoStatus
.
Information
=
response
->
len
;
/* We might have another request already in the buffer. */
if
(
parse_request
(
conn
)
<
0
)
{
WARN
(
"Failed to parse request; shutting down connection.
\n
"
);
send_400
(
conn
);
}
}
else
{
...
...
This diff is collapsed.
Click to expand it.
include/wine/http.h
+
1
−
0
View file @
c2668776
...
...
@@ -46,6 +46,7 @@ struct http_receive_request_params
struct
http_response
{
HTTP_REQUEST_ID
id
;
ULONG
response_flags
;
int
len
;
char
buffer
[
1
];
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment