cziegeler 2002/06/02 23:27:13
Modified: src/java/org/apache/cocoon/components/source Tag:
cocoon_2_0_3_branch URLSource.java
src/java/org/apache/cocoon/components/store Tag:
cocoon_2_0_3_branch FilesystemStore.java
src/scratchpad/src/org/apache/cocoon/sunshine/connector Tag:
cocoon_2_0_3_branch ResourceConnectorImpl.java
Log:
Main source now compiles again with JDK 1.2
Revision Changes Path
No revision
No revision
1.13.2.1 +1 -13
xml-cocoon2/src/java/org/apache/cocoon/components/source/URLSource.java
Index: URLSource.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/source/URLSource.java,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -u -r1.13 -r1.13.2.1
--- URLSource.java 7 Mar 2002 16:51:48 -0000 1.13
+++ URLSource.java 3 Jun 2002 06:27:13 -0000 1.13.2.1
@@ -88,7 +88,7 @@
* Description of a source which is described by an URL.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Id: URLSource.java,v 1.13 2002/03/07 16:51:48 vgritsenko Exp $
+ * @version CVS $Id: URLSource.java,v 1.13.2.1 2002/06/03 06:27:13 cziegeler Exp $
*/
public class URLSource extends AbstractStreamSource {
@@ -123,9 +123,6 @@
/** The <code>SourceParameters</code> for post */
private SourceParameters postParameters;
- /** Follow Redirects ? */
- private boolean followRedirects = true;
-
/**
* Construct a new object
*/
@@ -228,9 +225,6 @@
if (this.url.getProtocol().startsWith("http") && userInfo !=
null) {
this.connection.setRequestProperty("Authorization","Basic
"+SourceUtil.encodeBASE64(userInfo));
}
- if (this.followRedirects == false && this.connection instanceof
HttpURLConnection) {
-
((HttpURLConnection)connection).setInstanceFollowRedirects(false);
- }
// do a post operation
if (this.connection instanceof HttpURLConnection
&& this.postParameters != null) {
@@ -352,10 +346,4 @@
this.postParameters = pars;
}
- /**
- * Set the follow redirects flag
- */
- public void setFollowRedirects(boolean flag) {
- this.followRedirects = flag;
- }
}
No revision
No revision
1.14.2.1 +6 -2
xml-cocoon2/src/java/org/apache/cocoon/components/store/FilesystemStore.java
Index: FilesystemStore.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/FilesystemStore.java,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -r1.14 -r1.14.2.1
--- FilesystemStore.java 28 Mar 2002 09:56:58 -0000 1.14
+++ FilesystemStore.java 3 Jun 2002 06:27:13 -0000 1.14.2.1
@@ -73,7 +73,7 @@
*
* @author ?
* @author <a href="mailto:[EMAIL PROTECTED]">Vadim Gritsenko</a>
- * @version CVS $Id: FilesystemStore.java,v 1.14 2002/03/28 09:56:58 cziegeler Exp $
+ * @version CVS $Id: FilesystemStore.java,v 1.14.2.1 2002/06/03 06:27:13 cziegeler
Exp $
*/
public final class FilesystemStore
extends AbstractLoggable
@@ -374,7 +374,11 @@
*/
protected String decode( String filename )
{
- return java.net.URLDecoder.decode( filename );
+ try {
+ return java.net.URLDecoder.decode( filename );
+ } catch (Exception local) {
+ throw new RuntimeException("Exception in decode: " + local);
+ }
}
/** A BitSet defining the characters which don't need encoding */
No revision
No revision
1.4.2.1 +1 -7
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector/Attic/ResourceConnectorImpl.java
Index: ResourceConnectorImpl.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector/Attic/ResourceConnectorImpl.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- ResourceConnectorImpl.java 2 Apr 2002 14:23:44 -0000 1.4
+++ ResourceConnectorImpl.java 3 Jun 2002 06:27:13 -0000 1.4.2.1
@@ -98,7 +98,7 @@
* The Component for loading and saving xml to external resource connectors.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Id: ResourceConnectorImpl.java,v 1.4 2002/04/02 14:23:44 cziegeler
Exp $
+ * @version CVS $Id: ResourceConnectorImpl.java,v 1.4.2.1 2002/06/03 06:27:13
cziegeler Exp $
*/
public final class ResourceConnectorImpl
extends AbstractLoggable
@@ -213,9 +213,6 @@
uri = buffer.toString();
}
}
- boolean followRedirects = (typeParameters != null ?
-
typeParameters.getParameterAsBoolean("followRedirects", true)
- : true);
String method = (typeParameters != null ?
typeParameters.getParameter("method", "GET")
: "GET");
if (method.equalsIgnoreCase("POST") == true
@@ -250,9 +247,6 @@
if (method.equalsIgnoreCase("POST") == true
&& input instanceof URLSource) {
((URLSource)input).setPostParameters(resourceParameters);
- }
- if (followRedirects == false && input instanceof URLSource) {
- ((URLSource)input).setFollowRedirects(false);
}
return input;
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]