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)
| 879 | // |
| 880 | // These constraints are enforced by the handleXxx methods. |
| 881 | func parseDepth(s string) int { |
| 882 | switch s { |
| 883 | case "0": |
| 884 | return 0 |
| 885 | case "1": |
| 886 | return 1 |
| 887 | case "infinity": |
| 888 | return infiniteDepth |
| 889 | } |
| 890 | return invalidDepth |
| 891 | } |
| 892 | |
| 893 | // http://www.webdav.org/specs/rfc4918.html#status.code.extensions.to.http11 |
| 894 | const ( |
no outgoing calls
no test coverage detected