> On 29 Sep 2015, at 11:17 am, Graham Dumpleton <[email protected]> 
> wrote:
> 
> 
>> On 29 Sep 2015, at 10:38 am, Josh Rodriguez <[email protected]> wrote:
>> 
>> I'm trying to use Flask (via mod_wsgi) and mod_dav in the same location. I 
>> want mod_wsgi/Python to handle GET and POST requests (because I want to 
>> return enhanced HTML directory listings) while mod_dav handles methods like 
>> OPTIONS and PROPFIND.
>> 
>> I'm getting an 400 error with the log message "The URL contains extraneous 
>> path components. The resource could not be identified." when I try to access 
>> a resource via WebDAV.
>> 
>> I think I've figured out what's up.
>> 
>> I'm using WSGIScriptAlias as follows:
>> 
>> `WSGIScriptAlias / /usr/local/apache2/htdocs/test/test.wsgi`
>> 
>> But when I use a WebDAV client to connect to `/files/`, I find that the path 
>> that's passed to mod_dav has turned into:
>> 
>> `/usr/local/apache2/htdocs/test/test.wsgi/files`
>> 
>> Which makes sense, given the alias directive.
>> 
>> My question is, is there a way to keep this from happening for WebDAV 
>> requests? I'm assuming I can't do anything in Flask, that I need to catch 
>> and modify the request before it reaches mod_dav. 
> 
> As a first guess, try adding:
> 
>    <Location /files>
>    SetHandler default-handler
>    </Location>
> 
> I am not sure whether this will interact with WebDav properly or not, but I 
> think would normally stop mod_wsgi at least interfering with requests under 
> that URL. It may be necessary to work out what the handler name for WebDav is 
> and use it, although from memory I suspect it doesn’t use the handler concept.

Okay. Didn’t grok what you want properly.

That will only disable it for selected sub URLs, not by method type.

I will have to think some more. Unfortunately the Limit/LimitExcept directives 
don’t I believe work for handlers, only auth control.

Graham

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to