Code Monkey home page Code Monkey logo

Comments (11)

wader avatar wader commented on July 27, 2024

Can you provide some details what happens, logs, examples request/response and what you expected?

Also see comment about prefix https://github.com/mholt/caddy-webdav/blob/master/webdav.go#L29

from caddy-webdav.

wader avatar wader commented on July 27, 2024

@mholt maybe prefix should be documented somewhere, like in README?

from caddy-webdav.

faicker avatar faicker commented on July 27, 2024

thanks.
If the prefix is added, The upload is working.

prefix /share

from caddy-webdav.

mholt avatar mholt commented on July 27, 2024

Yeah, the readme should probably be updated.

It's a bit unfortunate that prefix is needed at all, since Caddy is capable of manipulating the URI with its other directives. But I don't know how to make our webdav dependency work without the prefix in certain situations. It'd be nice to find a way to not need that anymore.

from caddy-webdav.

wader avatar wader commented on July 27, 2024

I've tried to come up with something also but failed so far. Somehow keep track of matchers and or uri changes to let directives know what the "original" prefix is seems very messy? and in the webdav case i guess it would only work with some kind a match patterns?

As I understand the webdav spec the root of the issue is that the "href" response element for PROPFIND is required to be a URI or a "relative reference" which seems to mean an absolute path. Maybe this should be mentioned somehow?

from caddy-webdav.

mholt avatar mholt commented on July 27, 2024

Somehow keep track of matchers and or uri changes to let directives know what the "original" prefix is seems very messy?

I was thinking more like:

handle_path /path/* {
    webdav
}

but if the webdav handler is crafting URIs for the response, it will still need to know that the /path portion of the URI existed before it was stripped. This is actually available through orig_uri placeholders, but of course the webdav library dependency doesn't know about those...

from caddy-webdav.

wader avatar wader commented on July 27, 2024

Aha, could the default prefix value be some placeholder variable similar to how the root default value "{http.vars.root}" works? but i wonder how one could keep track of what part of the uri that has been matched and what part to pass as path to webdav library? sorry if misunderstand or is using the wrong caddy terminology, haven't digged much into caddy internal yet :)

from caddy-webdav.

wader avatar wader commented on July 27, 2024

@faicker can close?

from caddy-webdav.

mholt avatar mholt commented on July 27, 2024

@wader I get what you mean. It could probably be done with regular expressions, where you can name a capture group and then refer to those with placeholders in the subsequent route. But that seems like overkill...

from caddy-webdav.

wader avatar wader commented on July 27, 2024

@mholt That could work :) but i agree hard to find a elegant solution it seems

from caddy-webdav.

faicker avatar faicker commented on July 27, 2024

@wader yes, thanks.

from caddy-webdav.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.