You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Jason Harrop <jh...@bigpond.net.au> on 2001/02/17 15:20:33 UTC
IE open as Web Folder now doesn't work with my setup
Hi everyone
Summary: i can't access the slide webdav functionality with the web.xml
file below from Windows using IE5.5's open as web folder (NT 4 and 2000
machines), but i can via Windows 2000 network neighbourhood, and via the
slide command line client. I can use the IE5.5 open as webfolder
functionality with slide.war (plain vanilla configuration).
I'm using a custom Domain.xml file, SlideRealm, and web.xml, and can't
figure out why i'm getting this odd behaviour with one client only, and
then only when i don't use a vanilla setup.
My webapp is called TestDrive, and my web.xml contains:
<servlet>
<servlet-name>webdav</servlet-name>
<servlet-class>org.apache.slide.webdav.WebdavServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>namespace</param-name>
<param-value>TestDrive</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- The mapping for the Slide WebDAV servlet -->
<servlet-mapping>
<servlet-name>webdav</servlet-name>
<url-pattern>/protected/webdav/*</url-pattern>
</servlet-mapping>
I am also using SlideRealm, with:
<security-constraint>
<web-resource-collection>
<web-resource-name>TestDrive resource</web-resource-name>
<url-pattern>/protected/*</url-pattern>
When i try the url http://192.168.1.9/TestDrive/webdav/files using IE's
File-Open with open as webfolder ticked (which has worked perfectly well
in the past ie with Tomcat 4 a month or so old and slide a few days
old), Windows says it can't open the page as a web folder, and the Slide
logs say:
192.168.1.44 - - [17/Feb/2001:21:19:22 10000] "OPTIONS / HTTP/1.1" 200 -
192.168.1.44 - - [17/Feb/2001:21:19:22 10000] "GET /_vti_inf.html
HTTP/1.1" 404 -
192.168.1.44 - - [17/Feb/2001:21:19:22 10000] "POST
/_vti_bin/shtml.exe/_vti_rpc HTTP/1.1" 200 -
192.168.1.44 - - [17/Feb/2001:21:19:22 10000] "OPTIONS /TestDrive
HTTP/1.1" 200 -
(you'll see from the log of a "Add Network Place" dialog at the bottom
of this post that we expect that last OPTIONS statement to contain the
path /TestDrive/protected/webdav/files, and then there to be an
authentication challenge, which there would be if the longer path were
requested. )
Nothing is logged to catalina.out.
As i said, i can use webdav via both the slide webdav command line
client, and Windows 2000 Network neighbourhood - Add network place:
slide command line client
-------------------------
==> catalina.out <==
17 Feb 2001 21:45:41 - INFO - PROPFIND (time: 1502 ms) URI = /
==> TestDrive_localhost_access_log.2001-02-17.txt <==
192.168.1.10 - - [17/Feb/2001:21:45:39 10000] "PROPFIND
/TestDrive/protected/webdav/ HTTP/1.1" 401 -
192.168.1.10 - rAdminUser [17/Feb/2001:21:45:41 10000] "PROPFIND
/TestDrive/protected/webdav/ HTTP/1.1" 207 13077
==> TestDrive_localhost_log.2001-02-17.txt <==
2001-02-17 21:45:39 StandardHost[localhost]: Mapping request URI
'/TestDrive/protected/webdav/'
2001-02-17 21:45:39 StandardHost[localhost]: Trying the longest
context path prefix
2001-02-17 21:45:39 StandardHost[localhost]: Mapped to context '/TestDrive'
2001-02-17 21:45:39 StandardHost[localhost]: Mapping request URI
'/TestDrive/protected/webdav/'
2001-02-17 21:45:39 StandardHost[localhost]: Trying the longest
context path prefix
2001-02-17 21:45:39 StandardHost[localhost]: Mapped to context '/TestDrive'
Windows 2000 - MyNetworkPlaces-Add Network Place
------------------------------------------------
(takes a bit of cajoling - Windows does give some singularly unhelpful
error messages along the way) - you can see it is requesting the right
folders (unlike Internet Explorer).
First, type URL in box:
192.168.1.41 - - [18/Feb/2001:01:00:07 10000] "OPTIONS
/TestDrive/protected/webdav HTTP/1.1" 401 -
192.168.1.41 - - [18/Feb/2001:01:00:07 10000] "GET /_vti_inf.html
HTTP/1.1" 404 -
192.168.1.41 - - [18/Feb/2001:01:00:07 10000] "POST
/_vti_bin/shtml.exe/_vti_rpc HTTP/1.1" 200 -
192.168.1.41 - - [18/Feb/2001:01:00:07 10000] "OPTIONS
/TestDrive/protected/webdav/files HTTP/1.1" 401 -
Then type username/password in response to challenge:
192.168.1.41 - - [18/Feb/2001:01:01:52 10000] "OPTIONS
/TestDrive/protected/webdav/files HTTP/1.1" 401 -
192.168.1.41 - rAdminUser [18/Feb/2001:01:01:52 10000] "OPTIONS
/TestDrive/protected/webdav HTTP/1.1" 200 -
192.168.1.41 - rAdminUser [18/Feb/2001:01:01:52 10000] "PROPFIND
/TestDrive/protected/webdav/files HTTP/1.1" 207 836
18 Feb 2001 01:01:52 - INFO - OPTIONS (time: 53 ms) URI =
/protected/webdav <-------------- weird that this URI is sometimes
lsited?
Executing getPassword for username: rAdminUser
.. password is rAdminUser
18 Feb 2001 01:01:53 - INFO - PROPFIND (time: 141 ms) URI = /files
Then click "finish"
192.168.1.41 - rAdminUser [18/Feb/2001:01:06:36 10000] "PROPFIND
/TestDrive/protected/webdav/files HTTP/1.1" 207 4107
Executing getPassword for username: rAdminUser
.. password is rAdminUser
18 Feb 2001 01:06:36 - INFO - PROPFIND (time: 653 ms) URI = /files
Thanks for any suggestions as to where i should start digging to solve
this puzzle.
cheers,
Jason
ps, the only further experiment i can think of is to try slide.war with
a security constraint in place, but that'll have to wait until the morning!!
Re: IE open as Web Folder now doesn't work with my setup
Posted by "Park, Sung-Gu" <je...@thinkfree.com>.
I've tested the WebDAV URL of IIS 5.0 with IE5.5.
Nontheless, It did't work, even though I tested with MS IIS 5.0 and IE5.5.
I guess probably it could be a bug with IE 5.5?
----- Original Message -----
From: "Remy Maucherat" <re...@apache.org>
To: <sl...@jakarta.apache.org>
Sent: Sunday, February 18, 2001 4:00 PM
Subject: Re: IE open as Web Folder now doesn't work with my setup
| > I've largely worked it out now. Here is a summary:
| >
| > 1. "Win 2000 MyNetworkPlaces - Add Network Place", user-agent :
| > Microsoft Data Access Internet Publishing Provider DAV 1.1, tries
| > OPTIONS and PROPFIND on the exact URL you type in, whereas IE5.5,
| > user-agent : Microsoft Data Access Internet Publishing Provider DAV,
| > always truncates that URL and tries OPTIONS on "/" and OPTIONS on the
| > first path segment "/TestDrive".
| >
| > So that's one reason at least why you need the webdav servlet mapped to
| > the default servlet in the context - so that IE5.5's PEOPFIND returns
| > 207. If it gets that, it happily does a PROPFIND on the path you
| > actually typed - in my case PROPFIND /TestDrive/protected/webdav/files.
| >
| > I'm not entirely clear why things have been working for me - certainly i
| > did once have the webdav servlet as the default servlet in the context,
| > and set up some webfolders. I can only think that once i had some web
| > folders set up, i could later set up another without IE5.5 trying to do
| > its errant OPTIONS. I suspect this might be what happens, coz when you
| > try open as web folder in IE5.5, it does somehow look to see what web
| > folders are already set up.
|
| Overall, I'm not that happy about the behavior of the webfolders. I wan't
| aware of the Open as webfolder command. I always used them through the
| Network Places before. As usual with Microsoft (and perhaps even more than
| usual here), the error reporting is just terrible.
I checked that IE5.5 always use PROPFIND, when webfolder open the WebDAV
URL.
|
| > 2. The strange WebdavMethod.getRelativePath output occurs in cases like
| > the following:
| >
| > Path Info : null
| > Path translated : null
| > Query string : null
| > Request URI : /TestDrive/protected/webdav
| > Context path : /TestDrive
| > Servlet path : /protected/webdav
| >
| > getPathInfo() = null so WebdavMethod.getRelativePath sets its result to
| > getServletPath(), which = /protected/webdav
| >
| > Slide then looks for an object found at /protected, which would only be
| > there by coincidence, and logs:
| >
| > 18 Feb 2001 14:44:15 - INFO - GET (time: 113 ms) URI = /protected/webdav
| >
| > In these circumstances, maybe it would be better to return / ?
|
| The problem here is that when path info is null, it usually means the
| servlet is mapped as the default servlet (mapping = "/"), and that you
| should look at the servlet path.
| If the mapping is /webdav/* :
| Request : /webdav then path info = null and servlet path = /webdav
| Request : /webdav/ then path info = / and servlet path = /webdav
| Here, we want the second case to happen. However, MS engineers decided it
| was a good idea to strip the trailing / before making the request.
|
| We can choose to remove the possibility to map the servlet as the default
| servlet, and force to map it as "/*" (if it doesn't cause any other
| problems). If we do that, then both cases are identical, and we can
consider
| that path info = null is equivalent to path info = "/".
|
| Remy
|
Re: IE open as Web Folder now doesn't work with my setup
Posted by Remy Maucherat <re...@apache.org>.
> I've largely worked it out now. Here is a summary:
>
> 1. "Win 2000 MyNetworkPlaces - Add Network Place", user-agent :
> Microsoft Data Access Internet Publishing Provider DAV 1.1, tries
> OPTIONS and PROPFIND on the exact URL you type in, whereas IE5.5,
> user-agent : Microsoft Data Access Internet Publishing Provider DAV,
> always truncates that URL and tries OPTIONS on "/" and OPTIONS on the
> first path segment "/TestDrive".
>
> So that's one reason at least why you need the webdav servlet mapped to
> the default servlet in the context - so that IE5.5's PEOPFIND returns
> 207. If it gets that, it happily does a PROPFIND on the path you
> actually typed - in my case PROPFIND /TestDrive/protected/webdav/files.
>
> I'm not entirely clear why things have been working for me - certainly i
> did once have the webdav servlet as the default servlet in the context,
> and set up some webfolders. I can only think that once i had some web
> folders set up, i could later set up another without IE5.5 trying to do
> its errant OPTIONS. I suspect this might be what happens, coz when you
> try open as web folder in IE5.5, it does somehow look to see what web
> folders are already set up.
Overall, I'm not that happy about the behavior of the webfolders. I wan't
aware of the Open as webfolder command. I always used them through the
Network Places before. As usual with Microsoft (and perhaps even more than
usual here), the error reporting is just terrible.
> 2. The strange WebdavMethod.getRelativePath output occurs in cases like
> the following:
>
> Path Info : null
> Path translated : null
> Query string : null
> Request URI : /TestDrive/protected/webdav
> Context path : /TestDrive
> Servlet path : /protected/webdav
>
> getPathInfo() = null so WebdavMethod.getRelativePath sets its result to
> getServletPath(), which = /protected/webdav
>
> Slide then looks for an object found at /protected, which would only be
> there by coincidence, and logs:
>
> 18 Feb 2001 14:44:15 - INFO - GET (time: 113 ms) URI = /protected/webdav
>
> In these circumstances, maybe it would be better to return / ?
The problem here is that when path info is null, it usually means the
servlet is mapped as the default servlet (mapping = "/"), and that you
should look at the servlet path.
If the mapping is /webdav/* :
Request : /webdav then path info = null and servlet path = /webdav
Request : /webdav/ then path info = / and servlet path = /webdav
Here, we want the second case to happen. However, MS engineers decided it
was a good idea to strip the trailing / before making the request.
We can choose to remove the possibility to map the servlet as the default
servlet, and force to map it as "/*" (if it doesn't cause any other
problems). If we do that, then both cases are identical, and we can consider
that path info = null is equivalent to path info = "/".
Remy
Re: IE open as Web Folder now doesn't work with my setup
Posted by Jason Harrop <jh...@bigpond.net.au>.
Hello Remy
> The DAV servlet is mostly unsupported if it's not mapped as the default
> servlet in a context. Ie, it may work, but it's untested.
> WebdavMethod.getRelativePath is in charge of extracting the relative path,
> so the root of the problem may be there.
>
> However, I don't really understand why it way working some time ago but not
> anymore.
I've largely worked it out now. Here is a summary:
1. "Win 2000 MyNetworkPlaces - Add Network Place", user-agent :
Microsoft Data Access Internet Publishing Provider DAV 1.1, tries
OPTIONS and PROPFIND on the exact URL you type in, whereas IE5.5,
user-agent : Microsoft Data Access Internet Publishing Provider DAV,
always truncates that URL and tries OPTIONS on "/" and OPTIONS on the
first path segment "/TestDrive".
So that's one reason at least why you need the webdav servlet mapped to
the default servlet in the context - so that IE5.5's PEOPFIND returns
207. If it gets that, it happily does a PROPFIND on the path you
actually typed - in my case PROPFIND /TestDrive/protected/webdav/files.
I'm not entirely clear why things have been working for me - certainly i
did once have the webdav servlet as the default servlet in the context,
and set up some webfolders. I can only think that once i had some web
folders set up, i could later set up another without IE5.5 trying to do
its errant OPTIONS. I suspect this might be what happens, coz when you
try open as web folder in IE5.5, it does somehow look to see what web
folders are already set up.
2. The strange WebdavMethod.getRelativePath output occurs in cases like
the following:
Path Info : null
Path translated : null
Query string : null
Request URI : /TestDrive/protected/webdav
Context path : /TestDrive
Servlet path : /protected/webdav
getPathInfo() = null so WebdavMethod.getRelativePath sets its result to
getServletPath(), which = /protected/webdav
Slide then looks for an object found at /protected, which would only be
there by coincidence, and logs:
18 Feb 2001 14:44:15 - INFO - GET (time: 113 ms) URI = /protected/webdav
In these circumstances, maybe it would be better to return / ?
Thanks
Jason
Re: IE open as Web Folder now doesn't work with my setup
Posted by Remy Maucherat <re...@apache.org>.
> Hi everyone
>
> Summary: i can't access the slide webdav functionality with the web.xml
> file below from Windows using IE5.5's open as web folder (NT 4 and 2000
> machines), but i can via Windows 2000 network neighbourhood, and via the
> slide command line client. I can use the IE5.5 open as webfolder
> functionality with slide.war (plain vanilla configuration).
>
> I'm using a custom Domain.xml file, SlideRealm, and web.xml, and can't
> figure out why i'm getting this odd behaviour with one client only, and
> then only when i don't use a vanilla setup.
>
> My webapp is called TestDrive, and my web.xml contains:
>
> <servlet>
> <servlet-name>webdav</servlet-name>
> <servlet-class>org.apache.slide.webdav.WebdavServlet</servlet-class>
> <init-param>
> <param-name>debug</param-name>
> <param-value>0</param-value>
> </init-param>
> <init-param>
> <param-name>namespace</param-name>
> <param-value>TestDrive</param-value>
> </init-param>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
>
> <!-- The mapping for the Slide WebDAV servlet -->
> <servlet-mapping>
> <servlet-name>webdav</servlet-name>
> <url-pattern>/protected/webdav/*</url-pattern>
> </servlet-mapping>
>
> I am also using SlideRealm, with:
> <security-constraint>
> <web-resource-collection>
> <web-resource-name>TestDrive resource</web-resource-name>
> <url-pattern>/protected/*</url-pattern>
The DAV servlet is mostly unsupported if it's not mapped as the default
servlet in a context. Ie, it may work, but it's untested.
WebdavMethod.getRelativePath is in charge of extracting the relative path,
so the root of the problem may be there.
However, I don't really understand why it way working some time ago but not
anymore. Except for the URL decoding, there haven't been any changes in that
part of the code for a while. I don't think the problem comes from the URL
encoding (and I've seen the webfolders behave really weird in lots of
situations; the logs are really strange too). I'll do some testing and try
to come up with a rational explanation.
Remy