File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -110,12 +110,17 @@ private function send(string $request): array {
110
110
);
111
111
}
112
112
113
- // read header
114
- $ protocol = $ this ->readIcapStatusLine ();
115
- $ headers = $ this ->readHeaders ();
113
+ $ headers = [];
116
114
$ resHdr = [];
117
- if (isset ($ headers ['Encapsulated ' ])) {
118
- $ resHdr = $ this ->parseResHdr ($ headers ['Encapsulated ' ]);
115
+ $ protocol = $ this ->readIcapStatusLine ();
116
+
117
+ // McAfee seems to not properly close the socket once all response bytes are sent to the client
118
+ // So if ICAP status is 204 we just stop reading
119
+ if ($ protocol ['code ' ] !== 204 ) {
120
+ $ headers = $ this ->readHeaders ();
121
+ if (isset ($ headers ['Encapsulated ' ])) {
122
+ $ resHdr = $ this ->parseResHdr ($ headers ['Encapsulated ' ]);
123
+ }
119
124
}
120
125
121
126
$ this ->disconnect ();
You can’t perform that action at this time.
0 commit comments