bin/varnishd/cache/cache_http.c
int
http_GetHdrField(const struct http *hp, hdr_t hdr,
    const char *field, const char **ptr)
{
	const char *h;
	int i;

	if (ptr != NULL)
		*ptr = NULL;

	h = NULL;
	i = http_GetHdrToken(hp, hdr, field, &h, NULL);
	if (!i)
		return (i);

	if (ptr != NULL && h != NULL) {
		/* Skip whitespace, looking for '=' */
		while (*h && vct_issp(*h))
			h++;
		if (*h == '=') {
			h++;
			while (*h && vct_issp(*h))
				h++;
			*ptr = h;
		}
	}
	return (i);
}
/*--------------------------------------------------------------------
 * Find a given header field's value.
 */
Find a given header field's value.
Find a given header field ' s value .
int
http_GetHdrField(const struct http *hp, hdr_t hdr,
    const char *field, const char **ptr)
{
	const char *h;
	int i;
	if (ptr != NULL)
		*ptr = NULL;
	h = NULL;
	i = http_GetHdrToken(hp, hdr, field, &h, NULL);
	if (!i)
		return (i);
	if (ptr != NULL && h != NULL) {
		while (*h && vct_issp(*h))
			h++;
		if (*h == '=') {
			h++;
			while (*h && vct_issp(*h))
				h++;
			*ptr = h;
		}
	}
	return (i);
}
int http_GetHdrField ( const struct http * hp , hdr_t hdr , const char * field , const char * * ptr ) { const char * h ; int i ; if ( ptr != NULL ) * ptr = NULL ; h = NULL ; i = http_GetHdrToken ( hp , hdr , field , & h , NULL ) ; if ( ! i ) return ( i ) ; if ( ptr != NULL && h != NULL ) { while ( * h && vct_issp ( * h ) ) h ++ ; if ( * h == ' ' ) { h ++ ; while ( * h && vct_issp ( * h ) ) h ++ ; * ptr = h ; } } return ( i ) ; }
Find a given header field's value.
Find a given header field ' s value .
/* Skip whitespace, looking for '=' */