Shikhar13 / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

AndroidImplementation HttpURLConnection's automatically redirect #293

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
JavaSEPort.java, the redirect behavior of HttpURLConnection's are set to false 
in these methods:

public void init(Object m)
1362: HttpURLConnection.setFollowRedirects(false);

public Object connect(String, boolean, boolean)
2837: c.setInstanceFollowRedirects(false);

AndroidImplementation.java, however, does not set the follow redirect behavior 
to false in either case. This causes ConnectionRequest objects to automatically 
redirect regardless of their followRedirects property and does not allow the 
developer to control this behavior.

The two lines form the JavaSEPort listed above should probably be also put in 
their respect methods of AndroidImplementation.java so that HttpURLConnection's 
in android builds do not automatically redirect and both implementations behave 
the same way.

Original issue reported on code.google.com by Ian.Te...@gmail.com on 9 Aug 2012 at 7:21

GoogleCodeExporter commented 9 years ago
Assigning to Chen for evaluation

Original comment by shai.almog on 9 Aug 2012 at 7:24

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r387.

Original comment by cf27...@gmail.com on 9 Aug 2012 at 9:45

GoogleCodeExporter commented 9 years ago
fixed, thanks

Original comment by cf27...@gmail.com on 9 Aug 2012 at 10:44