Score:0

Handling a long URL in a 302 redirect on nginx

cn flag

I have a URL shortener tool running on nginx (1.20.0), that redirects to various URLs using a simple 302 Redirect (Django redirect shortcut, to be precise, which sends a 302). I noticed that with a particular URL (over 3850 bytes in total), nginx refuses to send the 302, and returns a 502 error instead.

It seems like this is a server configuration issue. Where can I adjust the maximum size of the 302?

Ivan Shatsky avatar
gr flag
Tuning proxy buffering sometimes can help solving such issues. Check the `proxy_buffers`, `proxy_buffer_size`, `proxy_busy_buffers_size` directives. Those are for the HTTP proxy module, but analogs for FastCGI (`fastcgi_*`) or uWSGI (`uwsgi_*`) modules are also exists.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.