Commit 28aca809 authored by Marcel Huber's avatar Marcel Huber
Browse files

Merge branch 'feature_extend-http-verbs' into develop

parents ca16c6e5 e957b285
Pipeline #52115 passed with stages
in 21 minutes and 8 seconds
......@@ -39,6 +39,10 @@ namespace coast {
char const *const getMethodSlotname = "GET";
char const *const postMethodSlotname = "POST";
char const *const putMethodSlotname = "PUT";
char const *const deleteMethodSlotname = "DELETE";
char const *const optionsMethodSlotname = "OPTIONS";
char const *const patchMethodSlotname = "PATCH";
char const headerNameDelimiter = ':';
char const headerArgumentsDelimiter = ',';
......
......@@ -101,7 +101,13 @@ bool HTTPProcessor::DoPrepareContextRequest(std::iostream &Ios, Context &ctx, An
bool HTTPProcessor::DoReadRequestBody(std::iostream &Ios, Context &ctx, Anything &request, HTTPRequestReader &reader) {
StartTrace(HTTPProcessor.DoReadRequestBody);
MethodTimer(HTTPProcessor.DoReadRequestBody, "Reading request body", ctx);
if (request["REQUEST_METHOD"].AsString().IsEqual(coast::http::constants::postMethodSlotname)) {
String requestMethod = ROAnything(request)["REQUEST_METHOD"].AsString();
Trace("Processing [" << requestMethod << "] request");
if (requestMethod.empty()) {
return false;
}
if (requestMethod.IsEqual(coast::http::constants::postMethodSlotname)) {
Trace("Preparing body parsing");
HTTPPostRequestBodyParser sm = GetRequestBodyParser(reader.GetHeaderParser());
try {
sm.Parse(Ios);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment