Skip to content

Commit 2bb4724

Browse files
committed
Fix broken uwsgi test on windows:
* test/modules/proxy/env.py (ProxyBackend._process): read 8192 bytes on Windows and 4096 elsewhere to avoid short reads on win32. Submitted by: Paul Lodge <paullodge outlook.com> GitHub: closes #785 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938786 13f79535-47bb-0310-9956-ffa450edef68
1 parent 3fc5caa commit 2bb4724

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎test/modules/proxy/env.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import logging
33
import os
44
import socket
5+
import sys
56
from threading import Thread
67

78
from pyhttpd.certs import CertificateSpec
@@ -45,13 +46,14 @@ def _make_response(self, data):
4546
Content-Length: 5
4647
4748
Hello""".encode()
48-
49+
4950
def _process(self):
51+
_read_buffer = 8192 if sys.platform == "win32" else 4096
5052
while not self._done:
5153
try:
5254
c, client_address = self._socket.accept()
5355
try:
54-
data = c.recv(4096)
56+
data = c.recv(_read_buffer)
5557
# capture request to backend
5658
self._request = data
5759
c.sendall(self._make_response(data))

0 commit comments

Comments
 (0)