MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / isHttpHeaderNameByte

Function isHttpHeaderNameByte

Libraries/HttpClient/HttpClient.cpp:152–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152static bool isHttpHeaderNameByte(char c)
153{
154 if ((c >= 'a' and c <= 'z') or (c >= 'A' and c <= 'Z') or (c >= '0' and c <= '9'))
155 {
156 return true;
157 }
158 switch (c)
159 {
160 case '!':
161 case '#':
162 case '$':
163 case '%':
164 case '&':
165 case '\'':
166 case '*':
167 case '+':
168 case '-':
169 case '.':
170 case '^':
171 case '_':
172 case '`':
173 case '|':
174 case '~': return true;
175 }
176 return false;
177}
178
179static SC::Result validateRequestHeaders(SC::Span<const SC::HttpClientHeader> headers)
180{

Callers 1

validateRequestHeadersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected