MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / content_length

Method content_length

libi2pd/HTTP.cpp:431–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

429 }
430
431 long int HTTPMsg::content_length() const
432 {
433 unsigned long int length = 0;
434 auto it = headers.find("Content-Length");
435 if (it == headers.end())
436 return -1;
437 errno = 0;
438 length = std::strtoul(it->second.c_str(), (char **) NULL, 10);
439 if (errno != 0)
440 return -1;
441 return length;
442 }
443
444 int HTTPRes::parse(const char *buf, size_t len)
445 {

Callers 2

MakeRequestMethod · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by 1

mainFunction · 0.64