parseDepth maps the strings "0", "1" and "infinity" to 0, 1 and infiniteDepth. Parsing any other string returns invalidDepth. Different WebDAV methods have further constraints on valid depths: - PROPFIND has no further restrictions, as per section 9.1. - COPY accepts only "0" or "infinity", as per
(s string)
| 863 | // |
| 864 | // These constraints are enforced by the handleXxx methods. |
| 865 | func parseDepth(s string) int { |
| 866 | switch s { |
| 867 | case "0": |
| 868 | return 0 |
| 869 | case "1": |
| 870 | return 1 |
| 871 | case "infinity": |
| 872 | return infiniteDepth |
| 873 | } |
| 874 | return invalidDepth |
| 875 | } |
| 876 | |
| 877 | // http://www.webdav.org/specs/rfc4918.html#status.code.extensions.to.http11 |
| 878 | const ( |
no outgoing calls
no test coverage detected