MCPcopy Create free account
hub / github.com/acl-dev/acl / getAcceptEncoding

Method getAcceptEncoding

lib_acl_cpp/src/http/HttpServletRequest.cpp:1003–1027  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1001}
1002
1003void HttpServletRequest::getAcceptEncoding(std::vector<string>& out) const
1004{
1005 out.clear();
1006 const char* ptr;
1007
1008 if (cgi_mode_) {
1009 ptr = acl_getenv("HTTP_ACCEPT_ENCODING");
1010 } else if (client_) {
1011 ptr = client_->header_value("Accept-Encoding");
1012 } else {
1013 return;
1014 }
1015
1016 if (ptr == NULL || *ptr == 0) {
1017 return;
1018 }
1019
1020 ACL_ARGV* tokens = acl_argv_split(ptr, ",; \t");
1021 ACL_ITER iter;
1022 acl_foreach(iter, tokens) {
1023 const char* token = (const char*) iter.data;
1024 out.push_back(token);
1025 }
1026 acl_argv_free(tokens);
1027}
1028
1029void HttpServletRequest::setRwTimeout(int rw_timeout)
1030{

Callers 1

sendHeaderMethod · 0.80

Calls 5

acl_getenvFunction · 0.85
acl_argv_splitFunction · 0.85
acl_argv_freeFunction · 0.85
clearMethod · 0.45
header_valueMethod · 0.45

Tested by

no test coverage detected