Subject: Re: somewhat off topic: managing Win32 limits in WebDAV

From: Julian Reschke <[email-masked]>
Date: Wed, 10 Dec 2008 18:33:01 +0100

Mark Phillips wrote:
>   I would be most grateful for information and/or links to articles that 
> describe how others have dealt with the 260 character path limit in 
> Windows. The product manager I work with feels we must support Windows 
> as a backend for the DAV enable product we are developing. Testing with 
> a few clients has exposed the Win32 limitation in a rather stark way.
> 
> Thank you, in advance.
> 
> Mark Phillips

Hi Mark,

it seems to be you selected a non-optimal list for this question :-) -- 
[email-masked] (the generic WebDAV mailing list) seems to be a 
better choice.

That being said -- are you referring to a limit on the client or on the 
server?

In general, Windows can deal with longer paths, you just need to use the 
correct API for that. If course, many Windows *applications*, such as 
Explorer, don't.

BR, Julian

---

From: Mark Phillips <[email-masked]>
Date: Wed, 10 Dec 2008 13:04:47 -0800

I need to join the other list.

I am dealing with a server side limitation. Our set up is Apache 2.2 on
Windows XP Pro for the moment. We wrote our own client and the URL limit is
10,000,000. Probably excessive but there you go.

In our tests, Apache reports a 403 error but that appears to be misleading.
Further testing reveals a "magic" limit where URI's between 249 and 260
characters in length fail on the MKCOL command.

So our supposition is the ever-popular MAX_PATH constraint. Of course, that
may not be the issue and we open to new info.

thanks for the reply,

 - Mark

---

From: Julian Reschke <[email-masked]>
Date: Thu, 11 Dec 2008 09:36:03 +0100

Mark Phillips wrote:
> ...

I guess it depends on what APR (Apache Portable Runtime) supports on 
Windows. It's quite possible that it doesn't take advantage of the more 
modern Windows APIs that do not suffer from these length restrictions.

BR, Julian

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Thu, 11 Dec 2008 10:18:54 +0100

>modern Windows APIs that do not suffer from these length restrictions.

If APR is compiled with APR_HAS_UNICODE_FS it supports APR_PATH_MAX long
paths on Windows, the latter being set to 8192 by default. Note that the
individual components have file system specific limits, as I recall, and
as http://en.wikipedia.org/wiki/NTFS seems to confirm, it's 255 for NTFS
so you cannot have file names or directory names longer than that. Other
systems http://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits
tend to have similar limits, so I am not sure that is the problem here.
The httpd also has its own limits for e.g. request header line length.
-- 
Björn Höhrmann · mailto:[email-masked] · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

---

From: Mark Phillips <[email-masked]>
Date: Mon, 15 Dec 2008 08:52:31 -0800

On 12/11/08 1:18 AM, "Bjoern Hoehrmann" <[email-masked]> wrote:
>>> Windows XP Pro for the moment.
>>> 
> so you cannot have file names or directory names longer than that.

As a follow up, the issue appears to be addressed in Apache 2.2.6, in which
a modification to the apr library enforces the use of the unicode path
scheme. Refer to <http://marc.info/?l=apr-dev&m=120084184128491&w=2> for
more information.

Thank you for your comments; they definitely helped us get closer to a
resolution.

 - Mark