Lines Matching refs:hbp
189 char *hbp /* pointer to current line in header buffer */
192 if (word_eq(hbp, "CONTENT-LENGTH:")) {
193 while (isgraph(*hbp))
194 hbp++;
195 while (*hbp == ' ' || *hbp == '\t')
196 hbp++;
197 if (!isdigit(*hbp))
199 h->content_length = atol(hbp);
203 if (word_eq(hbp, "TRANSFER_ENCODING:") ||
204 word_eq(hbp, "TRANSFER-ENCODING:")) {
205 while (isgraph(*hbp))
206 hbp++;
207 while (*hbp == ' ' || *hbp == '\t')
208 hbp++;
212 if (word_eq(hbp, "CHUNKED")) {
226 char *hbp = h->hdr; /* pointer into h->hdr */
231 if (!isgraph(*hbp))
233 if (os_strncmp(hbp, "HTTP/", 5) == 0) {
236 hbp += 5;
237 if (hbp[0] == '1' && hbp[1] == '.' &&
238 isdigit(hbp[2]) && hbp[2] != '0')
240 while (isgraph(*hbp))
241 hbp++;
242 while (*hbp == ' ' || *hbp == '\t')
243 hbp++;
244 if (!isdigit(*hbp))
246 h->reply_code = atol(hbp);
247 } else if (word_eq(hbp, "GET"))
249 else if (word_eq(hbp, "HEAD"))
251 else if (word_eq(hbp, "POST"))
253 else if (word_eq(hbp, "PUT"))
255 else if (word_eq(hbp, "DELETE"))
257 else if (word_eq(hbp, "TRACE"))
259 else if (word_eq(hbp, "CONNECT"))
261 else if (word_eq(hbp, "NOTIFY"))
263 else if (word_eq(hbp, "M-SEARCH"))
265 else if (word_eq(hbp, "M-POST"))
267 else if (word_eq(hbp, "SUBSCRIBE"))
269 else if (word_eq(hbp, "UNSUBSCRIBE"))
278 while (isgraph(*hbp))
279 hbp++;
280 while (*hbp == ' ' || *hbp == '\t')
281 hbp++;
287 rawuri = hbp;
288 while (isgraph(*hbp))
289 hbp++;
290 h->uri = os_malloc((hbp - rawuri) + 1);
294 while (rawuri < hbp) {
307 while (isgraph(*hbp))
308 hbp++;
309 while (*hbp == ' ' || *hbp == '\t')
310 hbp++;
312 if (0 == strncmp(hbp, "HTTP/", 5)) {
313 hbp += 5;
314 if (hbp[0] == '1' && hbp[1] == '.' &&
315 isdigit(hbp[2]) && hbp[2] != '0')
320 while (*hbp)
321 if (*hbp++ == '\n')
329 if (hbp[0] == '\n' ||
330 (hbp[0] == '\r' && hbp[1] == '\n'))
332 if (!isgraph(*hbp))
334 if (httpread_hdr_option_analyze(h, hbp))
337 while (*hbp)
338 if (*hbp++ == '\n')
400 char *hbp; /* pointer into header buffer */
446 hbp = h->hdr + h->hdr_nbytes;
458 *hbp++ = *rbp++;
462 hbp[-1] == '\n' &&
463 hbp[-2] == '\r' &&
464 hbp[-3] == '\n' &&
465 hbp[-4] == '\r' ) {
467 *hbp = 0; /* null terminate */