Changeset View
Changeset View
Standalone View
Standalone View
src/ioslaves/http/parsinghelpers.cpp
Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Line(s) | 128 | static const HeaderFieldTemplate headerFieldTemplates[] = { | |||
---|---|---|---|---|---|
156 | //by sending several instances of this field as opposed to | 156 | //by sending several instances of this field as opposed to | ||
157 | //usually comma-separated lists with maybe multiple instances. | 157 | //usually comma-separated lists with maybe multiple instances. | ||
158 | {"transfer-encoding", true}, | 158 | {"transfer-encoding", true}, | ||
159 | {"upgrade", true}, | 159 | {"upgrade", true}, | ||
160 | {"warning", true}, | 160 | {"warning", true}, | ||
161 | {"www-authenticate", false} //see proxy-authenticate | 161 | {"www-authenticate", false} //see proxy-authenticate | ||
162 | }; | 162 | }; | ||
163 | 163 | | |||
164 | for (uint i = 0; i < sizeof(headerFieldTemplates) / sizeof(HeaderFieldTemplate); i++) { | 164 | for (const HeaderFieldTemplate &ft : headerFieldTemplates) { | ||
165 | const HeaderFieldTemplate &ft = headerFieldTemplates[i]; | | |||
166 | insert(QByteArray(ft.name), HeaderField(ft.isMultiValued)); | 165 | insert(QByteArray(ft.name), HeaderField(ft.isMultiValued)); | ||
167 | } | 166 | } | ||
168 | } | 167 | } | ||
169 | 168 | | |||
170 | int HeaderTokenizer::tokenize(int begin, int end) | 169 | int HeaderTokenizer::tokenize(int begin, int end) | ||
171 | { | 170 | { | ||
172 | char *buf = m_buffer; //keep line length in check :/ | 171 | char *buf = m_buffer; //keep line length in check :/ | ||
173 | int idx = begin; | 172 | int idx = begin; | ||
▲ Show 20 Lines • Show All 427 Lines • Show Last 20 Lines |