bool FetchUtils::isSimpleOrForbiddenRequest(const String& method, const HTTPHeaderMap& headerMap)
{
    if (!isSimpleMethod(method))
        return false;

    for (const auto& header : headerMap) {
        if (!isSimpleHeader(header.key, header.value) && !isForbiddenHeaderName(header.key))
            return false;
    }

    return true;
}
Esempio n. 2
0
bool FetchUtils::isSimpleOrForbiddenRequest(const String& method, const HTTPHeaderMap& headerMap)
{
    if (!isSimpleMethod(method))
        return false;

    HTTPHeaderMap::const_iterator end = headerMap.end();
    for (HTTPHeaderMap::const_iterator it = headerMap.begin(); it != end; ++it) {
        if (!isSimpleHeader(it->key, it->value) && !isForbiddenHeaderName(it->key))
            return false;
    }

    return true;
}
bool FetchUtils::isSimpleRequest(const String& method, const HTTPHeaderMap& headerMap)
{
    if (!isSimpleMethod(method))
        return false;

    for (const auto& header : headerMap) {
        // Preflight is required for MIME types that can not be sent via form
        // submission.
        if (!isSimpleHeader(header.key, header.value))
            return false;
    }

    return true;
}
Esempio n. 4
0
bool FetchUtils::isSimpleRequest(const String& method, const HTTPHeaderMap& headerMap)
{
    if (!isSimpleMethod(method))
        return false;

    HTTPHeaderMap::const_iterator end = headerMap.end();
    for (HTTPHeaderMap::const_iterator it = headerMap.begin(); it != end; ++it) {
        // Preflight is required for MIME types that can not be sent via form
        // submission.
        if (!isSimpleHeader(it->key, it->value))
            return false;
    }

    return true;
}