if (!**r_range) {
if (r->byterange > 1) {
if (realreq)
- ap_rvputs(r, "\015\012--", r->boundary, "--\015\012", NULL);
+ ap_rvputs(r, CRLF "--", r->boundary, "--" CRLF, NULL);
else
*tlength += 4 + strlen(r->boundary) + 4;
}
ap_snprintf(ts, sizeof(ts), "%ld-%ld/%ld", range_start, range_end,
r->clength);
if (realreq)
- ap_rvputs(r, "\015\012--", r->boundary, "\015\012Content-type: ",
- ct, "\015\012Content-range: bytes ", ts, "\015\012\015\012",
+ ap_rvputs(r, CRLF "--", r->boundary, CRLF "Content-type: ",
+ ct, CRLF "Content-range: bytes ", ts, CRLF CRLF,
NULL);
else
*tlength += 4 + strlen(r->boundary) + 16 + strlen(ct) + 23 +
API_EXPORT_NONSTD(int) ap_send_header_field(request_rec *r,
const char *fieldname, const char *fieldval)
{
- return (0 < ap_rvputs(r, fieldname, ": ", fieldval, "\015\012", NULL));
+ return (0 < ap_rvputs(r, fieldname, ": ", fieldval, CRLF, NULL));
}
API_EXPORT(void) ap_basic_http_header(request_rec *r)
/* Output the HTTP/1.x Status-Line and the Date and Server fields */
- ap_rvputs(r, protocol, " ", r->status_line, "\015\012", NULL);
+ ap_rvputs(r, protocol, " ", r->status_line, CRLF, NULL);
date = ap_palloc(r->pool, AP_RFC822_DATE_LEN);
ap_rfc822_date(date, r->request_time);
ap_bgetopt(r->connection->client, BO_BYTECT, &bs);
if (bs >= 255 && bs <= 257)
- ap_rputs("X-Pad: avoid browser bug\015\012", r);
+ ap_rputs("X-Pad: avoid browser bug" CRLF, r);
- ap_rputs("\015\012", r); /* Send the terminating empty line */
+ ap_rputs(CRLF, r); /* Send the terminating empty line */
}
/* Build the Allow field-value from the request handler method mask.
/* Now we recreate the request, and echo it back */
- ap_rvputs(r, r->the_request, "\015\012", NULL);
+ ap_rvputs(r, r->the_request, CRLF, NULL);
ap_table_do((int (*) (void *, const char *, const char *))
ap_send_header_field, (void *) r, r->headers_in, NULL);
- ap_rputs("\015\012", r);
+ ap_rputs(CRLF, r);
return OK;
}
r->chunked = 0;
ap_bsetflag(r->connection->client, B_CHUNK, 0);
- ap_rputs("0\015\012", r);
+ ap_rputs("0" CRLF, r);
/* If we had footer "headers", we'd send them now */
- ap_rputs("\015\012", r);
+ ap_rputs(CRLF, r);
}
}
if (r->expecting_100 && r->proto_num >= HTTP_VERSION(1,1)) {
/* sending 100 Continue interim response */
- ap_rvputs(r, AP_SERVER_PROTOCOL, " ", status_lines[0], "\015\012\015\012",
+ ap_rvputs(r, AP_SERVER_PROTOCOL, " ", status_lines[0], CRLF CRLF,
NULL);
ap_rflush(r);
}
}
break;
case BAD_GATEWAY:
- ap_rputs("The proxy server received an invalid\015\012"
- "response from an upstream server.<P>\015\012", r);
+ ap_rputs("The proxy server received an invalid" CRLF
+ "response from an upstream server.<P>" CRLF, r);
if ((error_notes = ap_table_get(r->notes, "error-notes")) != NULL) {
ap_rvputs(r, error_notes, "<P>\n", NULL);
}