/[storm]/storm/org/nongnu/storm/util/HTTPProxy.java
ViewVC logotype

Diff of /storm/org/nongnu/storm/util/HTTPProxy.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.45 by benja, Tue May 27 02:22:50 2003 UTC revision 1.46 by benja, Tue May 27 02:56:21 2003 UTC
# Line 569  public class HTTPProxy implements Runnab Line 569  public class HTTPProxy implements Runnab
569              return resp;              return resp;
570          }                }      
571    
572            /**
573          protected HTTPResponse doPropfind(HTTPRequest req, HTTPResponse.Factory resf)          protected HTTPResponse doPropfind(HTTPRequest req, HTTPResponse.Factory resf)
574              throws IOException {              throws IOException {
575              // XXX absolutely dummy implementation              // XXX absolutely dummy implementation
576    
577                String r = CopyUtil.readString(req.getInputStream());
578    
579                p("PROPFIND request:");
580                p(r);
581                p("Sending dummy response.");
582    
583                HTTPResponse resp = resf.makeResponse(207, "Multi-Status");
584                resp.setField("Content-Type", "text/xml");
585                Writer w = new OutputStreamWriter(resp.getOutputStream(),
586                                                  "UTF-8");
587                w.write("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n");
588                w.write("<D:multistatus xmlns:D=\"DAV:\">\n");
589                w.write("<D:response>\n");
590                w.write("<D:href>"+ROOTURL+req.getRequestURI()+"</D:href>\n");
591                w.write("<D:propstat>\n");
592                w.write("<D:prop>\n");
593                //w.write("<D:creationdate/>\n");
594                //w.write("<D:displayname/>\n");
595                w.write("<D:resourcetype>\n");
596                if(req.getRequestURI().endsWith("/"))
597                    w.write("<D:resourcetype/>\n");
598                w.write("</D:resourcetype>\n");
599                //w.write("<D:supportedlock/>\n");
600                w.write("</D:prop>\n");
601                w.write("<D:status>HTTP/1.1 200 OK</D:status>");
602                w.write("</D:propstat>\n");
603                w.write("</D:response>\n");
604                w.write("<D:responsedescription>\n");
605                w.write("A faked empty response has been sent.\n");
606                w.write("WebDAV isn't really implemented yet.\n");
607                w.write("</D:responsedescription>\n");
608                w.write("</D:multistatus>\n");
609                w.close();
610    
611                return resp;
612          }          }
613    
614            protected HTTPResponse dispatch(HTTPRequest req, HTTPResponse.Factory resf)
615                throws IOException {
616                p("Dispatch: "+req);
617                return super.dispatch(req, resf);
618            }      
619            **/
620      }          }    
621    
622      protected BlockId getBlockId(String uri) {      protected BlockId getBlockId(String uri) {

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26