Assuming that the correct status code is returned, the problem is that the intermediate proxy is shutting down. "The server, acting as a gateway or proxy, did not receive a timely response from the upstream server specified in the URI." (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.5) Most likely, this indicates that the source server has some kind of problem (i.e. it takes a long time to processing your request), so it does not respond quickly.
Perhaps the best solution is to re-create your server application so that it responds with the status code "303 See Other"; then your client can receive the data at a later data point as soon as the server completes the processing and creates the final result.
Edit: Another idea is to re-create the server application so that it responds with a 413 Request Entity Too Large status code when the size of the request entity is too large. This will save you from the error, although it may make your application less useful if it can only process "small" files. "
Other possible solutions:
- Increase the timeout for the proxy (if it is under your control)
- Make your request on another server (if there is another, faster server with the same application)
- Make your request different (if possible) so that you send less data at a time
james.garriss
source share