Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] HTTP based Filetransfer

Hi Scott and Erkki,
I will try this out ASAP. Thanks for very helpful replies.

Regards,
Thomas Hallgren


Scott Lewis wrote:
Hi Erkki,

I took a look at the code, and in our current apache httpclient 3.0.1-based provider we have the following:

           getMethod = new GetMethod(urlString);
           getMethod.setFollowRedirects(true);

I haven't yet tested it (because I'm not sure how to get a server to create a 302 response), but I believe based upon the docs Erkki points to (http://hc.apache.org/httpclient-3.x/redirects.html), that this will work as expected for 302 (moved temporarily).

So the upshot is...I believe that ECF *with* the apache httpclient-based provider (org.eclipse.ecf.provider.filetransfer.httpclient) will work as expected (follow redirect) when encountering a 302 (or any redirect). This is with the caveat that I haven't tested the httpclient setFollowRedirects behavior yet with a real 302.

Scott


Erkki Lindpere wrote:
IIRC, the HttpClient could be configured to handle this automatically. But I may be mistaken, perhaps it did require custom exception handling or something like that.

The project has moved from Jakarta/Commons to top level and I can't find the JavaDoc online, but maybe this helps: http://hc.apache.org/httpclient-3.x/redirects.html

Erkki

Thomas Hallgren wrote:
Hi,
Will the ECF filestransfer implementation for http do some extra magic if it encounters a 302 response? The reason I ask is this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=219372. It seems the JVM runtime URL implementation doesn't always do that (although the error is perhaps in what the server is sending). Will ECF help in this respect?

Regards,
Thomas Hallgren

_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev

_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev

_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev



Back to the top