this is probably caused by a limited post buffer on the side of the proxy server. and to be frank i don't see a need to change that.
the official recommendation is not to use more than 50 ed2k links at once anyway
)
That being the case, why not set the textarea's character limit to the same size as the post buffer?
This way, it's immediately obvious that the buffer is full, as further text cannot be pasted in to the textarea. Rather than a 502, the user is given more meaningful feedback, as the success page only shows the links that fitted in the textarea.
A first-time user of ed2kdump might assume that 502 meant that it was broken, not that their input was too long.