Httpclient Redirection support: 301 Moved Permanently

639 views
Skip to first unread message

Pprun Pi

unread,
Mar 3, 2014, 9:45:08 PM3/3/14
to ve...@googlegroups.com
Is there a solution to enable auto redirection in HttpClient?

As 3XX status codes are normal, such as, en.wikipedia.org is auto redirext to  http://en.wikipedia.org/wiki/Main_Page.

In  asynchttpclient, there's attribute to switch it on:
http://loopj.com/android-async-http/doc/com/loopj/android/http/AsyncHttpClient.html#setEnableRedirects%28boolean%29


Norman Maurer

unread,
Mar 4, 2014, 12:16:44 AM3/4/14
to ve...@googlegroups.com
Nope there isn't atm
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Alexander Lehmann

unread,
Mar 4, 2014, 2:08:07 PM3/4/14
to ve...@googlegroups.com, norman...@googlemail.com
I'm always a bit wary when a client supports redirects as default (e.g. curl), since you do not really know what is happening, however it would be nice to have an option you switch on to enable.

Tim Fox

unread,
Mar 4, 2014, 2:09:09 PM3/4/14
to ve...@googlegroups.com
On 04/03/14 19:08, Alexander Lehmann wrote:
I'm always a bit wary when a client supports redirects as default (e.g. curl), since you do not really know what is happening, however it would be nice to have an option you switch on to enable.

I agree.

If anyone wants to add a BZ feature request, please feel free.

Norman Maurer

unread,
Mar 4, 2014, 2:51:50 PM3/4/14
to ve...@googlegroups.com, Tim Fox

An 4. März 2014 at 20:09:12, Tim Fox (timv...@gmail.com) schrieb:

On 04/03/14 19:08, Alexander Lehmann wrote:
I'm always a bit wary when a client supports redirects as default (e.g. curl), since you do not really know what is happening, however it would be nice to have an option you switch on to enable.

I agree.

If anyone wants to add a BZ feature request, please feel free.

Or even better submit a BZ and PR with the needed change. We love contributions ;)






On Tuesday, March 4, 2014 6:16:44 AM UTC+1, Norman Maurer wrote:
Nope there isn't atm

Am 04.03.2014 um 03:45 schrieb Pprun Pi <pprun....@gmail.com>:

Is there a solution to enable auto redirection in HttpClient?

As 3XX status codes are normal, such as, en.wikipedia.org is auto redirext to  http://en.wikipedia.org/wiki/Main_Page.

In  asynchttpclient, there's attribute to switch it on:
http://loopj.com/android-async-http/doc/com/loopj/android/http/AsyncHttpClient.html#setEnableRedirects%28boolean%29


--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


-- 
Norman Maurer

Alexander Lehmann

unread,
Mar 4, 2014, 4:45:20 PM3/4/14
to ve...@googlegroups.com, Tim Fox, norman...@googlemail.com


On Tuesday, March 4, 2014 8:51:50 PM UTC+1, Norman Maurer wrote:

An 4. März 2014 at 20:09:12, Tim Fox (timv...@gmail.com) schrieb:

On 04/03/14 19:08, Alexander Lehmann wrote:
I'm always a bit wary when a client supports redirects as default (e.g. curl), since you do not really know what is happening, however it would be nice to have an option you switch on to enable.

I agree.

If anyone wants to add a BZ feature request, please feel free.

Or even better submit a BZ and PR with the needed change. We love contributions ;)



This is actually a bit difficult to get right since there may be issues with cookie processing and the redirection of POST request. I can try to implement something if I find the time, though.


 

pprun.dragon

unread,
Mar 4, 2014, 9:29:12 PM3/4/14
to ve...@googlegroups.com, Alexander Lehmann, Tim Fox, norman...@googlemail.com
--
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/3yNF0evWUD4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages