Lines Matching defs:resp

596   struct response *resp = xnew0 (struct response);
597 resp->data = head;
604 return resp;
614 DO_REALLOC (resp->headers, size, count + 1, const char *);
615 resp->headers[count++] = hdr;
632 DO_REALLOC (resp->headers, size, count + 1, const char *);
633 resp->headers[count] = NULL;
635 return resp;
651 resp_header_locate (const struct response *resp, const char *name, int start,
655 const char **headers = resp->headers;
696 resp_header_get (const struct response *resp, const char *name,
699 int pos = resp_header_locate (resp, name, 0, begptr, endptr);
712 resp_header_copy (const struct response *resp, const char *name,
716 if (!resp_header_get (resp, name, &b, &e))
731 resp_header_strdup (const struct response *resp, const char *name)
734 if (!resp_header_get (resp, name, &b, &e))
748 resp_status (const struct response *resp, char **message)
753 if (!resp->headers)
761 p = resp->headers[0];
762 end = resp->headers[1];
808 resp_free (struct response *resp)
810 xfree_null (resp->headers);
811 xfree (resp);
833 print_server_response (const struct response *resp, const char *prefix)
836 if (!resp->headers)
838 for (i = 0; resp->headers[i + 1]; i++)
840 const char *b = resp->headers[i];
841 const char *e = resp->headers[i + 1];
1429 struct response *resp;
1747 resp = resp_new (head);
1748 statcode = resp_status (resp, &message);
1750 resp_free (resp);
1832 resp = resp_new (head);
1836 statcode = resp_status (resp, &message);
1844 print_server_response (resp, " ");
1848 && resp_header_copy (resp, "Content-Length", hdrval, sizeof (hdrval)))
1875 if (resp_header_copy (resp, "Keep-Alive", NULL, 0))
1877 else if (resp_header_copy (resp, "Connection", hdrval, sizeof (hdrval)))
1892 (scpos = resp_header_locate (resp, "Set-Cookie", scpos,
1924 (wapos = resp_header_locate (resp, "WWW-Authenticate", wapos,
1961 resp_free (resp);
1974 resp_free (resp);
1991 || !resp_header_copy (resp, "Content-Disposition",
2105 type = resp_header_strdup (resp, "Content-Type");
2127 hs->newloc = resp_header_strdup (resp, "Location");
2128 hs->remote_time = resp_header_strdup (resp, "Last-Modified");
2130 if (resp_header_copy (resp, "Content-Range", hdrval, sizeof (hdrval)))
2140 resp_free (resp);