15 #include "httpEntityTag.h"
26 HTTPEntityTag(
const string &text) {
30 if (text.length() >= 2) {
31 string sub = text.substr(0, 2);
32 if (sub ==
"W/" || sub ==
"w/") {
40 if (p < text.length() && text[p] ==
'"') {
44 while (p < text.length() && !(quoted && text[p] ==
'"')) {
45 if (text[p] ==
'\\') {
68 for (string::const_iterator ti = _tag.begin(); ti != _tag.end(); ++ti) {
string get_string() const
Returns the entity tag formatted for sending to an HTTP server (the tag is quoted, with a conditional W/ prefix).