You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if"POST" === requestMethod {
let headers = this->getHeaders();
if fetch overridedMethod, headers["X-HTTP-METHOD-OVERRIDE"] {
let returnMethod = overridedMethod;
} elseif this->_httpMethodParameterOverride {
if fetch spoofedMethod, _REQUEST["_method"] {
let returnMethod = spoofedMethod;
}
}
}
You expects that headers variables contains uppercase "X-HTTP-METHOD-OVERRIDE".
But,
for name, value in _SERVER {
ifstarts_with(name, "HTTP_") {
let name = ucwords(strtolower(str_replace("_", "", substr(name, 5)))),
name = str_replace("", "-", name);
let headers[name] = value;
} elseif isset contentHeaders[name] {
let name = ucwords(strtolower(str_replace("_", "", name))),
name = str_replace("", "-", name);
let headers[name] = value;
}
}
getHeaders method uses ucwords, so returns "X-Http-Method-Override".
Details
Phalcon version: > 3.0.0
The text was updated successfully, but these errors were encountered:
Expected and Actual Behavior
getMethod In Phalcon\Http\Request,
You expects that headers variables contains uppercase "X-HTTP-METHOD-OVERRIDE".
But,
getHeaders method uses ucwords, so returns "X-Http-Method-Override".
Details
The text was updated successfully, but these errors were encountered: