Example #1
0
/**
 * Passed an HTTP header like "Cookie" or "Cache-Control"
 **/
std::string FastCGITransport::getHeader(const char *name) {
  auto *header = getRawHeaderPtr(mangleHeader(name));
  if (header) {
    return *header;
  }
  if (strcasecmp(name, "Content-Length") == 0) {
    return getRawHeader(s_contentLength); // No HTTP_ prefix for CONTENT_LENGTH
  }
  if (strcasecmp(name, "Content-Type") == 0) {
    return getRawHeader(s_contentType); // No HTTP_ prefix for CONTENT_TYPE
  }
  return "";
}
Example #2
0
/**
 * Passed an HTTP header like "Cookie" or "Cache-Control"
 **/
std::string FastCGITransport::getHeader(const char *name) {
  return getRawHeader(mangleHeader(name));
}