Actions
Defect #19621
closed502 Bad Gateway when i upload files > 100kb
Status:
Closed
Priority:
High
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Invalid
Affected version:
Description
Hello,
I use the REST Api with Json, and i use Java langage.
This is my code :
File fileJeuxDonnees = new File("tryAgain.zip"); InputStream content = new FileInputStream(fileJeuxDonnees); final HttpPost request = new HttpPost(uploadURI); final MultipartEntityBuilder multipartEntity = MultipartEntityBuilder.create(); /* Content type required by a Redmine */ multipartEntity.addBinaryBody("uploadFile", content, ContentType.APPLICATION_OCTET_STREAM , null); HttpEntity entity = multipartEntity.build(); request.setEntity(entity); final HttpClient httpclient = new DefaultHttpClient(); HttpResponse httpResponse = httpclient.execute((HttpUriRequest) request);
If i upload small zip file size (~10ko), it's ok, but if i try to upload a zip file of 1155Ko for example, the response of the server on the param
httpResponseis :
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>502 Bad Gateway</title> </head><body> <h1>Bad Gateway</h1> <p>The proxy server received an invalid response from an upstream server.<br /> </p> <hr> <address>Apache/2.2.15 (Red Hat) Server at **************** Port 443</address> </body></html>
My version of Redmine is 1.4.4 and i can't change.
What is the problem ?
Actions