MCPcopy Create free account
hub / github.com/SmingHub/Sming / onValue

Method onValue

Sming/Components/Network/src/Network/Http/BasicHttpHeaders.cpp:70–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70int BasicHttpHeaders::onValue(const char* at, size_t length)
71{
72 if(count_ >= ARRAY_SIZE(headers)) {
73 return -1;
74 }
75 if(length == 0) {
76 headers[count_].value = nullptr;
77 } else {
78 const_cast<char*>(at)[length] = '\0';
79 headers[count_].value = at;
80 }
81 ++count_;
82 return 0;
83}
84
85const char* BasicHttpHeaders::operator[](const char* name) const
86{

Callers 1

staticOnValueMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected