FreeBSD/contrib/subversion/subversion/libsvn_ra_serf/property.c
/* Return the HTTP status code contained in STATUS_LINE, or 0 if
   there's a problem parsing it. */
Return the HTTP status code contained in STATUS_LINE, or 0 if
there's a problem parsing it.
Return the HTTP status code contained in STATUS_LINE or 0 if there ' s a problem parsing it .
static apr_int64_t parse_status_code(const char *status_line)
{
  if (status_line[0] == 'H' &&
      status_line[1] == 'T' &&
      status_line[2] == 'T' &&
      status_line[3] == 'P' &&
      status_line[4] == '/' &&
      (status_line[5] >= '0' && status_line[5] <= '9') &&
      status_line[6] == '.' &&
      (status_line[7] >= '0' && status_line[7] <= '9') &&
      status_line[8] == ' ')
    {
      char *reason;
      return apr_strtoi64(status_line + 8, &reason, 10);
    }
  return 0;
}
static apr_int64_t parse_status_code ( const char * status_line ) { if ( status_line [ 0 ] == ' ' && status_line [ 1 ] == ' ' && status_line [ 2 ] == ' ' && status_line [ 3 ] == ' ' && status_line [ 4 ] == ' ' && ( status_line [ 5 ] >= ' ' && status_line [ 5 ] <= ' ' ) && status_line [ 6 ] == ' ' && ( status_line [ 7 ] >= ' ' && status_line [ 7 ] <= ' ' ) && status_line [ 8 ] == ' ' ) { char * reason ; return apr_strtoi64 ( status_line + 8 , & reason , 10 ) ; } return 0 ; }
Return the HTTP status code contained in STATUS_LINE, or 0 if
there's a problem parsing it.
Return the HTTP status code contained in STATUS_LINE or 0 if there ' s a problem parsing it .
/* STATUS_LINE should be of form: "HTTP/1.1 200 OK" */