*/
if (do_alloc) {
tmp = NULL;
- } else {
+ }
+ else {
/* We're null terminated. */
tmp = last_char;
}
* happen if it exceeds the configured limit for a request-line.
*/
if (APR_STATUS_IS_ENOSPC(rv)) {
- r->status = HTTP_REQUEST_URI_TOO_LARGE;
+ r->status = HTTP_REQUEST_URI_TOO_LARGE;
}
else if (APR_STATUS_IS_TIMEUP(rv)) {
r->status = HTTP_REQUEST_TIME_OUT;
r->assbackwards = 0;
pro = ll;
len = strlen(ll);
- } else {
+ }
+ else {
r->assbackwards = 1;
pro = "HTTP/0.9";
len = 8;
AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw)
{
- const char *auth_line = apr_table_get(r->headers_in,
- (PROXYREQ_PROXY == r->proxyreq)
- ? "Proxy-Authorization"
- : "Authorization");
- const char *t;
+ const char *t, *auth_line;
if (!(t = ap_auth_type(r)) || ap_casecmpstr(t, "Basic"))
return DECLINED;
return HTTP_INTERNAL_SERVER_ERROR;
}
+ auth_line = apr_table_get(r->headers_in,
+ (PROXYREQ_PROXY == r->proxyreq)
+ ? "Proxy-Authorization" : "Authorization");
+
if (!auth_line) {
ap_note_auth_failure(r);
return HTTP_UNAUTHORIZED;
ap_filter_t *f;
apr_bucket_brigade *bb;
} hdr_ptr;
+
static int send_header(void *data, const char *key, const char *val)
{
ap_fputstrs(((hdr_ptr*)data)->f, ((hdr_ptr*)data)->bb,
key, ": ", val, CRLF, NULL);
return 1;
}
+
AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers)
{
hdr_ptr x;
rr->expecting_100 = 0;
}
- status_line = apr_pstrcat(r->pool, AP_SERVER_PROTOCOL, " ", r->status_line, CRLF, NULL);
+ status_line = apr_pstrcat(r->pool, AP_SERVER_PROTOCOL " ", r->status_line, CRLF, NULL);
ap_xlate_proto_to_ascii(status_line, strlen(status_line));
x.f = r->connection->output_filters;