Commit 0436da93 authored by jan.koester's avatar jan.koester
Browse files

caldav support

parent d3a9b095
Loading
Loading
Loading
Loading
+2 −0
Changes for src/http.cpp: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -3398,6 +3398,7 @@ int libhttppp::RequestTypeFromMethod(const std::string &method)
        {"COPY", COPYREQUEST},         {"MOVE", MOVEREQUEST},
        {"LOCK", LOCKREQUEST},         {"UNLOCK", UNLOCKREQUEST},
        {"REPORT", REPORTREQUEST},     {"SEARCH", SEARCHREQUEST},
        {"MKCALENDAR", MKCALENDARREQUEST},
    };
    auto it = kTypes.find(method);
    return it != kTypes.end() ? it->second : GETREQUEST;
@@ -3422,6 +3423,7 @@ const char *libhttppp::RequestMethodName(int requestType)
        case UNLOCKREQUEST: return "UNLOCK";
        case REPORTREQUEST: return "REPORT";
        case SEARCHREQUEST: return "SEARCH";
        case MKCALENDARREQUEST: return "MKCALENDAR";
        default: return "";
    }
}
+4 −3
Changes for src/httpd.cpp: 4 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -2221,7 +2221,7 @@ bool isBodyMethod(int requestType) {
    case POSTREQUEST: case PUTREQUEST: case PATCHREQUEST:
    case PROPFINDREQUEST: case PROPPATCHREQUEST: case MKCOLREQUEST: case COPYREQUEST:
    case MOVEREQUEST: case LOCKREQUEST: case UNLOCKREQUEST: case REPORTREQUEST:
    case SEARCHREQUEST:
    case SEARCHREQUEST: case MKCALENDARREQUEST:
        return true;
    default:
        return false;
@@ -3019,7 +3019,8 @@ REQUESTHANDLING:
            case LOCKREQUEST:
            case UNLOCKREQUEST:
            case REPORTREQUEST:
            case SEARCHREQUEST: {
            case SEARCHREQUEST:
            case MKCALENDARREQUEST: {
                if(_startH1BodyStream(cureq, tid, args))
                    break;
                if(cureq.isChunkedRequest()){
@@ -3201,7 +3202,7 @@ void libhttppp::HttpEvent::ResponseEvent(netplus::con &curcon,const int tid,ULON
        // leads to an endless loop for large/multi-file uploads).
        const int rt = cureq.getRequestType();
        if (rt == POSTREQUEST || rt == PUTREQUEST || rt == PATCHREQUEST ||
            (rt >= PROPFINDREQUEST && rt <= SEARCHREQUEST)) {
            (rt >= PROPFINDREQUEST && rt <= MKCALENDARREQUEST)) {
            return;
        }
        if (cureq.getRequestType() == PARSEREQUEST && cureq.getRequestURL().empty()) {
+1 −0
Changes for src/httpdefinitions.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define UNLOCKREQUEST    14
#define REPORTREQUEST    15
#define SEARCHREQUEST    16
#define MKCALENDARREQUEST 17   // CalDAV (RFC 4791 5.3.1): creates a calendar collection, XML body

//define http version