Re: Does httpclient 3.0 work with Slide from HEAD? Was: Re: patch for Slide Ant tasks and commons httpclient 3.0
"Greg Schueler" <[email protected]> Mon, 19 Mar 2007 17:15:51 -0700
| Newsgroups | gmane.comp.jakarta.slide.devel |
|---|---|
| Message-ID | <[email protected]> |
Sorry, Eirikur, I haven't tried that. (is that part of the slide server?) I've only tried the basic webdav client lib methods: get, put, delete, mkcol, all via the Ant tasks. On 3/19/07, Eirikur Hrafnsson <[email protected]> wrote: > > Thanks for the quick reply Greg :) > > From what I've gathered with searching for Slide and HTTPClient 3.0 > and what we tried in the past the DASL search didn't work. > Does it work for you? > > cheers > Eiki > > > On Mar 19, 2007, at 6:18 PM, Greg Schueler wrote: > > > Hi Eirikur, > > > > We've built slide against HttpClient 3.0.1, and it seems to work, > > aside from > > that problem that I sent in the patch for. > > > > We have only tested the Ant tasks a bit, but so far they appear to > > work. > > (put, delete, mkcol, get) > > > > I'd be interested to hear your results with it if you decided to > > try it > > again. > > > > Thanks, > > Greg Schueler > > > > On 3/19/07, Eirikur Hrafnsson <[email protected]> wrote: > >> > >> Question for Slide developers or someone who knows... > >> > >> a while ago we tested HttpClient 3.0 with Slide (HEAD) and it didn't > >> work. Does it work now? > >> > >> We are unfortunately forced to use HttpClient 3.0 so I really hope > >> the answer is yes and I only have to rebuild our jar. (we use an > >> older version from HEAD today) > >> > >> Best Regards > >> > >> Eirikur S. Hrafnsson, [email protected] > >> Chief Software Engineer > >> Idega Software > >> http://www.idega.com > >> > >> > >> > >> On Mar 15, 2007, at 10:24 PM, Antoine Levy-Lambert wrote: > >> > >> > Hello Greg, > >> > > >> > thanks for your patch. Will work on it. > >> > > >> > Antoine > >> > -------- Original-Nachricht -------- > >> > Datum: Thu, 15 Mar 2007 15:18:27 -0700 > >> > Von: "Greg Schueler" <[email protected]> > >> > An: [email protected], "Anthony Shortland" > >> > <[email protected]>, "[email protected]" > >> <[email protected]> > >> > CC: > >> > Betreff: patch for Slide Ant tasks and commons httpclient 3.0 > >> > > >> >> Hi Antoine, > >> >> > >> >> re: Slide with commons httpclient 3.0 > >> >> http://issues.apache.org/bugzilla/show_bug.cgi?id=35213 > >> >> > >> >> > >> >> I was able to compile Slide against commons httpclient 3.0, but > >> >> ran into > >> >> one > >> >> bug when using the Ant tasks for slide. Using the Put task fails > >> >> because > >> >> httpclient 3.0 throws an exception: > >> >> > >> >> java.lang.IllegalArgumentException : Entity enclosing requests > >> >> cannot be > >> >> redirected without user intervention > >> >> at > >> >> > >> org.apache.commons.httpclient.methods.EntityEnclosingMethod.setFollow > >> >> Redirects > >> >> (EntityEnclosingMethod.java:221) > >> >> at org.apache.webdav.ant.Utils.putFile (Utils.java:272) > >> >> at org.apache.webdav.ant.taskdefs.Put.uploadFile(Put.java: > >> >> 345) > >> >> > >> >> The attached patch for Utils.java fixes this problem. I'm not > >> >> familiar > >> >> with > >> >> the DAV spec (specifically wrt redirects during a PUT > >> operation), but > >> >> httpclient 3.0 references the HTTP 1.1 RFC so I can't imagine that > >> >> DAV > >> >> goes > >> >> against that RFC. > >> >> > >> >> We are hoping to use Slide with httpclient 3.0 in our software, > >> >> especially > >> >> via the Ant tasks, so we do look forward to having a release > >> >> version of > >> >> slide with that support (rather than building from source > >> ourselves). > >> >> > >> >> Thanks! > >> >> Greg > >> >> > >> >> Index: webdavclient/ant/src/java/org/apache/webdav/ant/Utils.java > >> >> > >> =================================================================== > >> >> --- webdavclient/ant/src/java/org/apache/webdav/ant/Utils.java > >> >> (revision > >> >> 518395) > >> >> +++ webdavclient/ant/src/java/org/apache/webdav/ant/Utils.java > >> >> (working > >> >> copy) > >> >> @@ -269,7 +269,7 @@ > >> >> generateIfHeader(put, lockToken); > >> >> put.setRequestHeader("Content-Type", contentType); > >> >> put.setRequestBody(is); > >> >> - put.setFollowRedirects(true); > >> >> + put.setFollowRedirects(false); > >> >> int status = client.executeMethod(put); > >> >> switch (status) { > >> >> case WebdavStatus.SC_OK: > >> >> -- > >> >> Greg > >> > > >> > > >> --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: [email protected] > >> > For additional commands, e-mail: [email protected] > >> > > >> > >> > >> > >> > >> > > > > > > -- > > Greg > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Greg