Example #1
0
static int
http_handle_range_header(http_t *ctx, const char *name, char *value)
{
  RUNTIME_ASSERT(ctx);
  RUNTIME_ASSERT(name);
  RUNTIME_ASSERT(value);
  
  if (0 == http_parse_range(value, &ctx->range_set)) {
    DBUG("Ignoring unparsable Range header");
  }

  return 0;
}
Example #2
0
File: http.c Project: nqv/aranea
static
void http_save_header(struct request_t *self, char *key, char *val) {
    int i;

    for (i = 0; i < NUM_REQUEST_HEADER; ++i) {
        if (strcasecmp(key, HTTP_REQUEST_HEADERS[i]) == 0) {
            self->header[i] = val;
            break;
        }
    }
    if (i == HEADER_CONTENTRANGE) {
        http_parse_range(self, val);
    }
}