biddyweb / android-rcs-ims-stack

Automatically exported from code.google.com/p/android-rcs-ims-stack
2 stars 1 forks source link

Several FToHTTP upload when try refused with a 413 error response #132

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I try to send a FToHTTP from A to B
2.The file sent is larger than the limit set on the server
3.

What is the expected output?
If the file is too large, the request must be refused with a 413 error response.

What do you see instead?
The request is refused with a 413 error response. When the client receives the 
413 error repsponse it sends  again the same request to upload the file. This 
repetition problem occurs 3 times, so 4 requests have been sent and refused 
before the client stops to try to upload the file.

What version of the product are you using? On what operating system?
RI 2.5.7 on Android 4.0.4

Please provide any additional information below.
The file attached contains logs from the client. It shows all HTTP request and 
responses

Original issue reported on code.google.com by brochard...@gmail.com on 6 Aug 2013 at 4:43

Attachments:

GoogleCodeExporter commented 9 years ago
Corrected in v2.5.8 with the following update:

core/src/com/orangelabs/rcs/core/ims/service/im/filetransfer/http/HttpUploadMana
ger.java
+                case 413 :
+                    // File too large, refused by server
+                    break; // no success, no retry
                case 503 :
                    // INTERNAL ERROR
                    String header = connection.getHeaderField("Retry-After");

Original comment by jmauffret@gmail.com on 7 Aug 2013 at 8:01