dion        2002/09/25 16:49:55

  Modified:    latka/src/java/org/apache/commons/latka/http
                        RequestImpl.java
  Log:
  Fix for Bug 13010 from [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.32      +10 -6     
jakarta-commons/latka/src/java/org/apache/commons/latka/http/RequestImpl.java
  
  Index: RequestImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/http/RequestImpl.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- RequestImpl.java  18 Sep 2002 16:03:36 -0000      1.31
  +++ RequestImpl.java  25 Sep 2002 23:49:55 -0000      1.32
  @@ -290,6 +290,10 @@
               _log.debug("request executed");
               
               response = new ResponseImpl(this);
  +
  +            // Cache the response body to allow it to be accessed
  +            // after the http connection is closed.
  +            String sideEffectOnly = response.getResource();
               
               // set the referer
               // note: If followRedirects
  @@ -301,11 +305,11 @@
               _session.setReferer(new URL(_targetURL.getProtocol(), _host, _port,
                   _httpMethod.getPath()));
               
  +        } catch (HttpException e) {
  +            throw new IOException(e.toString());
           } catch (IOException e) {
               // rethrow it after closing the connection
               throw e;
  -        } catch (HttpException e) {
  -            throw new IOException(e.toString());
           } finally {
               try {
                   closeConnection(); 
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to