Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4849

502 Bad Gateway The server returned an invalid or incomplete response

$
0
0

Hello, I’m a simple backend:

backend lms_be
option httpchk HEAD / HTTP/1.1\r\nHost:\ lms.FQDN
option accept-invalid-http-response
server lms_be1 10.11.106:80 check

when my client do a post request:

POST /bccr/upload/IsApiFilter/UploadExt.dll??508&template8.asp HTTP/1.1
content-length: 1950
pragma: no-cache
cache-control: no-cache
upgrade-insecure-requests: 1
origin: http://lms.FQDN
content-type: multipart/form-data; boundary=----WebKitFormBoundarysEiqnYXKJIEDKHwC
user-agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
referer: http://lms.FQDN/bccr/asp/fun/test.asp?idresource=66
accept-encoding: gzip, deflate
accept-language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7
cookie: xxxxxxxxxxxxxxxxxxxxxxxx
host: lms.FQDN
x-forwarded-for: 192.168.92.48
FORM DATA

the server (IIS 6) reply with the correct output:

<html>
<head>
.....
</body>
</html>

but the client receive:

HTTP/1.1 502 Bad Gateway
content-length: 107
cache-control: no-cache
content-type: text/html
connection: close
<html><body><h1>502 Bad Gateway</h1>
The server returned an invalid or incomplete response.
</body></html>

the haproxy log:

Oct  8 16:33:28 localhost haproxy[2498008]: 192.168.92.48:46999 [08/Oct/2020:16:33:28.495] http-https lms_be/lms_be1 10.1.1.106 0/0/0/-1/11 502 214 - \- PH-- 2/2/0/0/0 0/0 "POST /bccr/upload/IsApiFilter/UploadExt.dll??525&template
8.asp HTTP/1.1"

the strace of the haproxy process:

2495551 recvfrom(66, "<html>\r\n<head>...</html>", 16320, 0, NULL, NULL) = 2615
2495551 recvfrom(66, "", 16320, 0, NULL, NULL) = 0
2495551 sendto(65, "HTTP/1.1 502 Bad Gateway\r\ncontent-length: 107\r\ncache-control: no-cache\r\ncontent-type: text/html\r\nconnection: close\r\n\r\n<html><body><h1>502 Bad Gateway</h1>\nThe server returned an invalid or incomplete response.\n</body></html>\n", 225, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 225

haproxy 2.2.4

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>