#502 instead of 302

19 messages · Page 1 of 1 (latest)

tepid sorrel
#

Hello,

On a very specific url, our backend respond a 302, but. cloudflare respond a 502 instead.

We have a subcription " pro plan"

How troubleshoot it ?

tropic zodiacBOT
#
Feedback

Feedback has been submitted! Thank you :)

tepid sorrel
#

however, curl -I is working

#
➜  ~ curl 'https://xxxx.com/specific-path'
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>cloudflare</center>
</body>
</html>
➜  ~ curl -I 'https://xxxx.com/specific-path'
HTTP/2 302 
date: Thu, 10 Jul 2025 07:41:17 GMT
content-type: text/xml;charset=utf-8
location: https://xxxx.com/destination
server: cloudflare
p3p: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"
powered-by: PrestaShop
strict-transport-security: max-age=31536000; includeSubDomains; preload
cf-cache-status: DYNAMIC
speculation-rules: "/cdn-cgi/speculation"
set-cookie: PrestaShop-dc3322657ce8126fd222a76a5428871f=def50200673a6cf6757dbf86b9a40facb48d883864c9b8d2425f3aa47e5a770b7aed8c4237c99c64bf2ae073c3836f6d2a2f242589b1275ef82177305c3db34eaf84c0d043798d2ef29d0f9d85186aaf35fd1135519717e2259899f2a68b8af9eda68d6149cca44231beb58a2020d5a342133b3cd4b222e50f6cd9aa394520f9ec5864709ee5d2f8ba81db856be209e22d1462cd2d6518ccc41915c30402; HttpOnly; SameSite=None; Secure; Path=/; Domain=xxxxx.com Max-Age=1727999; Expires=Wed, 30 Jul 2025 07:41:16 GMT
cf-ray: 95ce6af24eb8698e-CDG
alt-svc: h3=":443"; ma=86400
lyric radish
#

try with curl -v to get the response headers?

tepid sorrel
#
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off
< HTTP/2 502 
< server: cloudflare
< date: Thu, 10 Jul 2025 10:19:27 GMT
< content-type: text/html
< content-length: 155
< cf-ray: 95cf52a4abe1d0ab-CDG
< 
#

in direct, the server respond well ( when i bypass cloudflare )

lyric radish
#

Funny

devout shard
tepid sorrel
#

The header show

< HTTP/1.1 302 Moved Temporarily
< Server: nginx/1.20.1
< Date: Thu, 10 Jul 2025 11:12:56 GMT
< Content-Type: text/xml;charset=utf-8
< Content-Length: 0
< Connection: keep-alive
< P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"
< Powered-By: PrestaShop
< Content-Encoding: gzip
< Set-Cookie: PrestaShop-fesfesfesffesfesf=esfesesfesffseffse; expires=Wed, 30-Jul-2025 11:12:55 GMT; Max-Age=1727999; path=/;SameSite = None;Secure; domain=www.petit-beguin.fr; secure; HttpOnly
< Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
< Upgrade: h2,h2c
< Location: https://xxxxx.com/a-path
< 
* Connection #0 to host www.petit-beguin.fr left intact
#

( when i run curl -v

devout shard
tepid sorrel
#

no

#

it's a 302

devout shard
#

Just curious, because you have both content-type and encoding set

#

Might be that Cloudflare has problems with that. Not home atm, but I'll try later if that's what causes the Cloudflare 502

tepid sorrel
#

okay thanks, keep me informed

#

i will try some test by the waty

lyric radish
#

Content-Encoding without a Body sounds very bad