Skip to content

Commit

Permalink
Do not check header value
Browse files Browse the repository at this point in the history
  • Loading branch information
spiritloose committed Oct 3, 2009
1 parent ace1272 commit aab7f6a
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions mod_psgi.c
Expand Up @@ -235,18 +235,6 @@ static int output_status(request_rec *r, SV *status)
return OK;
}

static int check_header_value(const char *value)
{
int i;
int len = strlen(value);
for (i = 0; i < len; i++) {
if (value[i] < 37) {
return 1;
}
}
return 0;
}

static int output_headers(request_rec *r, AV *headers)
{
dTHX;
Expand All @@ -258,10 +246,7 @@ static int output_headers(request_rec *r, AV *headers)
if (key_sv == NULL || val_sv == NULL) break;
key = SvPV_nolen(key_sv);
val = SvPV_nolen(val_sv);
if (check_header_value(val) != 0) {
server_error(r, "value string must not contain characters below chr(37)");
return HTTP_INTERNAL_SERVER_ERROR;
} else if (strcmp(key, "Content-Type") == 0) {
if (strcmp(key, "Content-Type") == 0) {
r->content_type = apr_pstrdup(r->pool, val);
} else if (strcmp(key, "Status") == 0) {
server_error(r, "headers must not contain a Status");
Expand Down

0 comments on commit aab7f6a

Please sign in to comment.