Lines Matching defs:headers
2097 /* Read the MIME headers. */
3278 ** CGI can return special headers such as "Status:" and "Location:" which
3280 ** be the very first line written out, we have to accumulate all the headers
3282 ** out the saved headers and proceed to echo the rest of the response.
3290 char* headers;
3301 /* Slurp in all headers. */
3303 httpd_realloc_str( &headers, &headers_size, 500 );
3315 br = &(headers[headers_len]);
3318 httpd_realloc_str( &headers, &headers_size, headers_len + r );
3319 (void) memmove( &(headers[headers_len]), buf, r );
3321 headers[headers_len] = '\0';
3322 if ( ( br = strstr( headers, "\015\012\015\012" ) ) != (char*) 0 ||
3323 ( br = strstr( headers, "\012\012" ) ) != (char*) 0 )
3327 /* If there were no headers, bail. */
3328 if ( headers[0] == '\0' )
3336 if ( strncmp( headers, "HTTP/", 5 ) == 0 )
3338 cp = headers;
3342 if ( ( cp = strstr( headers, "Location:" ) ) != (char*) 0 &&
3344 ( cp == headers || *(cp-1) == '\012' ) )
3346 if ( ( cp = strstr( headers, "Status:" ) ) != (char*) 0 &&
3348 ( cp == headers || *(cp-1) == '\012' ) )
3377 /* Write the saved headers. */
3378 (void) httpd_write_fully( hc->conn_fd, headers, headers_len );