[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] storm/org/nongnu/storm/util HTTPProxy.java
From: |
Tuukka Hastrup |
Subject: |
[Gzz-commits] storm/org/nongnu/storm/util HTTPProxy.java |
Date: |
Thu, 24 Apr 2003 07:55:30 -0400 |
CVSROOT: /cvsroot/storm
Module name: storm
Changes by: Tuukka Hastrup <address@hidden> 03/04/24 07:55:30
Modified files:
org/nongnu/storm/util: HTTPProxy.java
Log message:
give error on wrong block IDs
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/storm/storm/org/nongnu/storm/util/HTTPProxy.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: storm/org/nongnu/storm/util/HTTPProxy.java
diff -u storm/org/nongnu/storm/util/HTTPProxy.java:1.3
storm/org/nongnu/storm/util/HTTPProxy.java:1.4
--- storm/org/nongnu/storm/util/HTTPProxy.java:1.3 Wed Apr 23 11:53:32 2003
+++ storm/org/nongnu/storm/util/HTTPProxy.java Thu Apr 24 07:55:30 2003
@@ -133,6 +133,16 @@
return resp;
} catch(FileNotFoundException e) {
return resf.makeError(404, "Not found");
+ } catch(IllegalArgumentException e) {
+ HTTPResponse resp = resf.makeResponse(404, "Not found");
+ resp.setField("Content-Type", "text/plain");
+ Writer w = new OutputStreamWriter(resp.getOutputStream(),
"US-ASCII");
+ w.write("404 - Not found\n\n");
+ w.write("The URN in request is invalid.");
+ w.write("Requested URI: "+req.getRequestURI()+"\n");
+ w.close();
+ resp.close();
+ return resp;
} catch(Exception e) {
e.printStackTrace();
return resf.makeError(500, "Internal error");
- [Gzz-commits] storm/org/nongnu/storm/util HTTPProxy.java, Benja Fallenstein, 2003/04/23
- [Gzz-commits] storm/org/nongnu/storm/util HTTPProxy.java,
Tuukka Hastrup <=
- [Gzz-commits] storm/org/nongnu/storm/util HTTPProxy.java, Tuukka Hastrup, 2003/04/24
- [Gzz-commits] storm/org/nongnu/storm/util HTTPProxy.java, Tuukka Hastrup, 2003/04/25
- [Gzz-commits] storm/org/nongnu/storm/util HTTPProxy.java, Tuukka Hastrup, 2003/04/25
- [Gzz-commits] storm/org/nongnu/storm/util HTTPProxy.java, Tuukka Hastrup, 2003/04/25
- [Gzz-commits] storm/org/nongnu/storm/util HTTPProxy.java, Tuukka Hastrup, 2003/04/25
- [Gzz-commits] storm/org/nongnu/storm/util HTTPProxy.java, Tuukka Hastrup, 2003/04/25
- [Gzz-commits] storm/org/nongnu/storm/util HTTPProxy.java, Tuukka Hastrup, 2003/04/26