[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] storm/org/nongnu/storm http/server/HTTPRequest....
From: |
Benja Fallenstein |
Subject: |
[Gzz-commits] storm/org/nongnu/storm http/server/HTTPRequest.... |
Date: |
Mon, 26 May 2003 22:56:21 -0400 |
CVSROOT: /cvsroot/storm
Module name: storm
Changes by: Benja Fallenstein <address@hidden> 03/05/26 22:56:21
Modified files:
org/nongnu/storm/http/server: HTTPRequest.java
org/nongnu/storm/util: HTTPProxy.java
Log message:
cannot currently make dummy propfind work with either emacs or
OpenOffice
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/storm/storm/org/nongnu/storm/http/server/HTTPRequest.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/storm/storm/org/nongnu/storm/util/HTTPProxy.java.diff?tr1=1.45&tr2=1.46&r1=text&r2=text
Patches:
Index: storm/org/nongnu/storm/http/server/HTTPRequest.java
diff -u storm/org/nongnu/storm/http/server/HTTPRequest.java:1.1
storm/org/nongnu/storm/http/server/HTTPRequest.java:1.2
--- storm/org/nongnu/storm/http/server/HTTPRequest.java:1.1 Sat Apr 19
08:20:29 2003
+++ storm/org/nongnu/storm/http/server/HTTPRequest.java Mon May 26 22:56:21 2003
@@ -86,6 +86,10 @@
return theHTTPVersion;
}
+ public String toString() {
+ return "HTTPRequest("+startLine+")";
+ }
+
private String method;
private String reqURI;
private String theHTTPVersion;
@@ -104,5 +108,4 @@
reqURI = line.substring(sp1 + 1, sp2);
theHTTPVersion = line.substring(sp2 + 1);
}
-
}
Index: storm/org/nongnu/storm/util/HTTPProxy.java
diff -u storm/org/nongnu/storm/util/HTTPProxy.java:1.45
storm/org/nongnu/storm/util/HTTPProxy.java:1.46
--- storm/org/nongnu/storm/util/HTTPProxy.java:1.45 Mon May 26 22:22:50 2003
+++ storm/org/nongnu/storm/util/HTTPProxy.java Mon May 26 22:56:21 2003
@@ -569,10 +569,54 @@
return resp;
}
+ /**
protected HTTPResponse doPropfind(HTTPRequest req, HTTPResponse.Factory
resf)
throws IOException {
// XXX absolutely dummy implementation
+
+ String r = CopyUtil.readString(req.getInputStream());
+
+ p("PROPFIND request:");
+ p(r);
+ p("Sending dummy response.");
+
+ HTTPResponse resp = resf.makeResponse(207, "Multi-Status");
+ resp.setField("Content-Type", "text/xml");
+ Writer w = new OutputStreamWriter(resp.getOutputStream(),
+ "UTF-8");
+ w.write("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n");
+ w.write("<D:multistatus xmlns:D=\"DAV:\">\n");
+ w.write("<D:response>\n");
+ w.write("<D:href>"+ROOTURL+req.getRequestURI()+"</D:href>\n");
+ w.write("<D:propstat>\n");
+ w.write("<D:prop>\n");
+ //w.write("<D:creationdate/>\n");
+ //w.write("<D:displayname/>\n");
+ w.write("<D:resourcetype>\n");
+ if(req.getRequestURI().endsWith("/"))
+ w.write("<D:resourcetype/>\n");
+ w.write("</D:resourcetype>\n");
+ //w.write("<D:supportedlock/>\n");
+ w.write("</D:prop>\n");
+ w.write("<D:status>HTTP/1.1 200 OK</D:status>");
+ w.write("</D:propstat>\n");
+ w.write("</D:response>\n");
+ w.write("<D:responsedescription>\n");
+ w.write("A faked empty response has been sent.\n");
+ w.write("WebDAV isn't really implemented yet.\n");
+ w.write("</D:responsedescription>\n");
+ w.write("</D:multistatus>\n");
+ w.close();
+
+ return resp;
}
+
+ protected HTTPResponse dispatch(HTTPRequest req, HTTPResponse.Factory
resf)
+ throws IOException {
+ p("Dispatch: "+req);
+ return super.dispatch(req, resf);
+ }
+ **/
}
protected BlockId getBlockId(String uri) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] storm/org/nongnu/storm http/server/HTTPRequest....,
Benja Fallenstein <=