|
Lines 216-221
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
Link Here
|
| 216 |
apr_size_t bytes_handled = 0, current_alloc = 0; |
216 |
apr_size_t bytes_handled = 0, current_alloc = 0; |
| 217 |
char *pos, *last_char = *s; |
217 |
char *pos, *last_char = *s; |
| 218 |
int do_alloc = (*s == NULL), saw_eos = 0; |
218 |
int do_alloc = (*s == NULL), saw_eos = 0; |
|
|
219 |
/* solo */ |
| 220 |
server_rec * ss = r->server; |
| 221 |
|
| 222 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 223 |
"ap_rgetline_core: START"); |
| 224 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 225 |
"ap_rgetline_core: START, r->the_request='%s'", r->the_request); |
| 226 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 227 |
"ap_rgetline_core: START, r->input_filters='%s'", r->input_filters); |
| 228 |
/* */ |
| 219 |
|
229 |
|
| 220 |
/* |
230 |
/* |
| 221 |
* Initialize last_char as otherwise a random value will be compared |
231 |
* Initialize last_char as otherwise a random value will be compared |
|
Lines 228-235
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
Link Here
|
| 228 |
|
238 |
|
| 229 |
for (;;) { |
239 |
for (;;) { |
| 230 |
apr_brigade_cleanup(bb); |
240 |
apr_brigade_cleanup(bb); |
|
|
241 |
/* solo */ |
| 242 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 243 |
"ap_rgetline_core: Post apr_brigade_cleanup(bb);"); |
| 244 |
/* */ |
| 231 |
rv = ap_get_brigade(r->input_filters, bb, AP_MODE_GETLINE, |
245 |
rv = ap_get_brigade(r->input_filters, bb, AP_MODE_GETLINE, |
| 232 |
APR_BLOCK_READ, 0); |
246 |
APR_BLOCK_READ, 0); |
|
|
247 |
/* solo */ |
| 248 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 249 |
"ap_rgetline_core: Post ap_get_brigade(r->input_filters, bb, ...); r->the_request='%s'", r->the_request); |
| 250 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 251 |
"ap_rgetline_core: Post ap_get_brigade(r->input_filters, bb, ...); r->input_filters='%s'", r->input_filters); |
| 252 |
/* */ |
| 233 |
if (rv != APR_SUCCESS) { |
253 |
if (rv != APR_SUCCESS) { |
| 234 |
return rv; |
254 |
return rv; |
| 235 |
} |
255 |
} |
|
Lines 246-251
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
Link Here
|
| 246 |
const char *str; |
266 |
const char *str; |
| 247 |
apr_size_t len; |
267 |
apr_size_t len; |
| 248 |
|
268 |
|
|
|
269 |
/* solo */ |
| 270 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 271 |
"ap_rgetline_core: for (e = APR_BRIGADE_FIRST(bb);...;e = APR_BUCKET_NEXT(e)), *s='%s'", *s); |
| 272 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 273 |
"ap_rgetline_core: for (e = APR_BRIGADE_FIRST(bb);...;e = APR_BUCKET_NEXT(e)), r->the_request='%s'", r->the_request); |
| 274 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 275 |
"ap_rgetline_core: for (e = APR_BRIGADE_FIRST(bb);...;e = APR_BUCKET_NEXT(e)), r->pool='%s'", r->pool); |
| 276 |
/* */ |
| 249 |
/* If we see an EOS, don't bother doing anything more. */ |
277 |
/* If we see an EOS, don't bother doing anything more. */ |
| 250 |
if (APR_BUCKET_IS_EOS(e)) { |
278 |
if (APR_BUCKET_IS_EOS(e)) { |
| 251 |
saw_eos = 1; |
279 |
saw_eos = 1; |
|
Lines 256-261
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
Link Here
|
| 256 |
if (rv != APR_SUCCESS) { |
284 |
if (rv != APR_SUCCESS) { |
| 257 |
return rv; |
285 |
return rv; |
| 258 |
} |
286 |
} |
|
|
287 |
/* solo */ |
| 288 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 289 |
"ap_rgetline_core: apr_bucket_read(e, &str, &len, APR_BLOCK_READ); str='%s'", str); |
| 290 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 291 |
"ap_rgetline_core: apr_bucket_read(e, &str, &len, APR_BLOCK_READ); len='%d'", len); |
| 292 |
/* */ |
| 259 |
|
293 |
|
| 260 |
if (len == 0) { |
294 |
if (len == 0) { |
| 261 |
/* no use attempting a zero-byte alloc (hurts when |
295 |
/* no use attempting a zero-byte alloc (hurts when |
|
Lines 269-279
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
Link Here
|
| 269 |
if (n < bytes_handled + len) { |
303 |
if (n < bytes_handled + len) { |
| 270 |
*read = bytes_handled; |
304 |
*read = bytes_handled; |
| 271 |
if (*s) { |
305 |
if (*s) { |
|
|
306 |
/* solo */ |
| 307 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 308 |
"ap_rgetline_core: (*s) is TRUE, *s='%s'", *s); |
| 309 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 310 |
"ap_rgetline_core: (*s) is TRUE, r->the_request='%s'", r->the_request); |
| 311 |
/* */ |
| 272 |
/* ensure this string is NUL terminated */ |
312 |
/* ensure this string is NUL terminated */ |
| 273 |
if (bytes_handled > 0) { |
313 |
if (bytes_handled > 0) { |
| 274 |
(*s)[bytes_handled-1] = '\0'; |
314 |
(*s)[bytes_handled-1] = '\0'; |
| 275 |
} |
315 |
} |
| 276 |
else { |
316 |
else { |
|
|
317 |
/* solo */ |
| 318 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 319 |
"ap_rgetline_core: (*s) is FALSE, *s='%s'", *s); |
| 320 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 321 |
"ap_rgetline_core: (*s) is FALSE, r->the_request='%s'", r->the_request); |
| 322 |
/* */ |
| 277 |
(*s)[0] = '\0'; |
323 |
(*s)[0] = '\0'; |
| 278 |
} |
324 |
} |
| 279 |
} |
325 |
} |
|
Lines 282-296
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
Link Here
|
| 282 |
|
328 |
|
| 283 |
/* Do we have to handle the allocation ourselves? */ |
329 |
/* Do we have to handle the allocation ourselves? */ |
| 284 |
if (do_alloc) { |
330 |
if (do_alloc) { |
|
|
331 |
/* solo */ |
| 332 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 333 |
"ap_rgetline_core: (do_alloc) is TRUE, r->the_request='%s'", r->the_request); |
| 334 |
/* */ |
| 285 |
/* We'll assume the common case where one bucket is enough. */ |
335 |
/* We'll assume the common case where one bucket is enough. */ |
| 286 |
if (!*s) { |
336 |
if (!*s) { |
|
|
337 |
/* solo */ |
| 338 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 339 |
"ap_rgetline_core: (!*s) is TRUE, *s='%s'", *s); |
| 340 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 341 |
"ap_rgetline_core: (!*s) is TRUE, r->the_request='%s'", r->the_request); |
| 342 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 343 |
"ap_rgetline_core: (!*s) is TRUE, r->pool='%s'", r->pool); |
| 344 |
/* */ |
| 287 |
current_alloc = len; |
345 |
current_alloc = len; |
| 288 |
if (current_alloc < MIN_LINE_ALLOC) { |
346 |
if (current_alloc < MIN_LINE_ALLOC) { |
|
|
347 |
/* solo */ |
| 348 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 349 |
"ap_rgetline_core: (current_alloc < MIN_LINE_ALLOC) is TRUE, r->the_request='%s'", r->the_request); |
| 350 |
/* */ |
| 289 |
current_alloc = MIN_LINE_ALLOC; |
351 |
current_alloc = MIN_LINE_ALLOC; |
| 290 |
} |
352 |
} |
| 291 |
*s = apr_palloc(r->pool, current_alloc); |
353 |
*s = apr_palloc(r->pool, current_alloc); |
| 292 |
} |
354 |
} |
| 293 |
else if (bytes_handled + len > current_alloc) { |
355 |
else if (bytes_handled + len > current_alloc) { |
|
|
356 |
/* solo */ |
| 357 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 358 |
"ap_rgetline_core: (*s) is FALSE, (bytes_handled + len > current_alloc) is TRUE, *s='%s'", *s); |
| 359 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 360 |
"ap_rgetline_core: (*s) is FALSE, (bytes_handled + len > current_alloc) is TRUE, r->the_request='%s'", r->the_request); |
| 361 |
/* */ |
| 294 |
/* Increase the buffer size */ |
362 |
/* Increase the buffer size */ |
| 295 |
apr_size_t new_size = current_alloc * 2; |
363 |
apr_size_t new_size = current_alloc * 2; |
| 296 |
char *new_buffer; |
364 |
char *new_buffer; |
|
Lines 305-312
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
Link Here
|
| 305 |
memcpy(new_buffer, *s, bytes_handled); |
373 |
memcpy(new_buffer, *s, bytes_handled); |
| 306 |
current_alloc = new_size; |
374 |
current_alloc = new_size; |
| 307 |
*s = new_buffer; |
375 |
*s = new_buffer; |
|
|
376 |
/* solo */ |
| 377 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 378 |
"ap_rgetline_core: (*s) is FALSE, (bytes_handled + len > current_alloc) is TRUE, *s = new_buffer, *s='%s'", *s); |
| 379 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 380 |
"ap_rgetline_core: (*s) is FALSE, (bytes_handled + len > current_alloc) is TRUE, r->the_request='%s'", r->the_request); |
| 381 |
/* */ |
| 308 |
} |
382 |
} |
| 309 |
} |
383 |
} |
|
|
384 |
/* solo */ |
| 385 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 386 |
"ap_rgetline_core: Post (do_alloc), *s='%s'", *s); |
| 387 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 388 |
"ap_rgetline_core: Post (do_alloc), r->the_request='%s'", r->the_request); |
| 389 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 390 |
"ap_rgetline_core: Post (do_alloc), bytes_handled='%d'", bytes_handled); |
| 391 |
/* */ |
| 310 |
|
392 |
|
| 311 |
/* Just copy the rest of the data to the end of the old buffer. */ |
393 |
/* Just copy the rest of the data to the end of the old buffer. */ |
| 312 |
pos = *s + bytes_handled; |
394 |
pos = *s + bytes_handled; |
|
Lines 315-324
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
Link Here
|
| 315 |
|
397 |
|
| 316 |
/* We've now processed that new data - update accordingly. */ |
398 |
/* We've now processed that new data - update accordingly. */ |
| 317 |
bytes_handled += len; |
399 |
bytes_handled += len; |
|
|
400 |
/* solo */ |
| 401 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 402 |
"ap_rgetline_core: Post 2 (do_alloc), *s='%s'", *s); |
| 403 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 404 |
"ap_rgetline_core: Post 2 (do_alloc), r->the_request='%s'", r->the_request); |
| 405 |
/* */ |
| 318 |
} |
406 |
} |
| 319 |
|
407 |
|
| 320 |
/* If we got a full line of input, stop reading */ |
408 |
/* If we got a full line of input, stop reading */ |
| 321 |
if (last_char && (*last_char == APR_ASCII_LF)) { |
409 |
if (last_char && (*last_char == APR_ASCII_LF)) { |
|
|
410 |
/* solo */ |
| 411 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 412 |
"ap_rgetline_core: (last_char && (*last_char == APR_ASCII_LF)) is TRUE, r->the_request='%s'", r->the_request); |
| 413 |
/* */ |
| 322 |
break; |
414 |
break; |
| 323 |
} |
415 |
} |
| 324 |
} |
416 |
} |
|
Lines 326-341
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
Link Here
|
| 326 |
/* Now NUL-terminate the string at the end of the line; |
418 |
/* Now NUL-terminate the string at the end of the line; |
| 327 |
* if the last-but-one character is a CR, terminate there */ |
419 |
* if the last-but-one character is a CR, terminate there */ |
| 328 |
if (last_char > *s && last_char[-1] == APR_ASCII_CR) { |
420 |
if (last_char > *s && last_char[-1] == APR_ASCII_CR) { |
|
|
421 |
/* solo */ |
| 422 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 423 |
"ap_rgetline_core: (last_char > *s && last_char[-1] == APR_ASCII_CR) is TRUE, r->the_request='%s'", r->the_request); |
| 424 |
/* */ |
| 329 |
last_char--; |
425 |
last_char--; |
| 330 |
} |
426 |
} |
| 331 |
*last_char = '\0'; |
427 |
*last_char = '\0'; |
| 332 |
bytes_handled = last_char - *s; |
428 |
bytes_handled = last_char - *s; |
|
|
429 |
/* solo */ |
| 430 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 431 |
"ap_rgetline_core: Post (last_char > *s && last_char[-1] == APR_ASCII_CR), r->the_request='%s'", r->the_request); |
| 432 |
/* */ |
| 333 |
|
433 |
|
| 334 |
/* If we're folding, we have more work to do. |
434 |
/* If we're folding, we have more work to do. |
| 335 |
* |
435 |
* |
| 336 |
* Note that if an EOS was seen, we know we can't have another line. |
436 |
* Note that if an EOS was seen, we know we can't have another line. |
| 337 |
*/ |
437 |
*/ |
| 338 |
if (fold && bytes_handled && !saw_eos) { |
438 |
if (fold && bytes_handled && !saw_eos) { |
|
|
439 |
/* solo */ |
| 440 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 441 |
"ap_rgetline_core: (fold && bytes_handled && !saw_eos) is TRUE, r->the_request='%s'", r->the_request); |
| 442 |
/* */ |
| 339 |
for (;;) { |
443 |
for (;;) { |
| 340 |
const char *str; |
444 |
const char *str; |
| 341 |
apr_size_t len; |
445 |
apr_size_t len; |
|
Lines 380-387
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
Link Here
|
| 380 |
*/ |
484 |
*/ |
| 381 |
c = *str; |
485 |
c = *str; |
| 382 |
if (c == APR_ASCII_BLANK || c == APR_ASCII_TAB) { |
486 |
if (c == APR_ASCII_BLANK || c == APR_ASCII_TAB) { |
|
|
487 |
/* solo */ |
| 488 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 489 |
"ap_rgetline_core: (c == APR_ASCII_BLANK || c == APR_ASCII_TAB) is TRUE, r->the_request='%s'", r->the_request); |
| 490 |
/* */ |
| 383 |
/* Do we have enough space? We may be full now. */ |
491 |
/* Do we have enough space? We may be full now. */ |
| 384 |
if (bytes_handled >= n) { |
492 |
if (bytes_handled >= n) { |
|
|
493 |
/* solo */ |
| 494 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 495 |
"ap_rgetline_core: (bytes_handled >= n) is TRUE, r->the_request='%s'", r->the_request); |
| 496 |
/* */ |
| 385 |
*read = n; |
497 |
*read = n; |
| 386 |
/* ensure this string is terminated */ |
498 |
/* ensure this string is terminated */ |
| 387 |
(*s)[n-1] = '\0'; |
499 |
(*s)[n-1] = '\0'; |
|
Lines 391-396
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
Link Here
|
| 391 |
apr_size_t next_size, next_len; |
503 |
apr_size_t next_size, next_len; |
| 392 |
char *tmp; |
504 |
char *tmp; |
| 393 |
|
505 |
|
|
|
506 |
/* solo */ |
| 507 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 508 |
"ap_rgetline_core: (bytes_handled >= n) is FALSE, r->the_request='%s'", r->the_request); |
| 509 |
/* */ |
| 394 |
/* If we're doing the allocations for them, we have to |
510 |
/* If we're doing the allocations for them, we have to |
| 395 |
* give ourselves a NULL and copy it on return. |
511 |
* give ourselves a NULL and copy it on return. |
| 396 |
*/ |
512 |
*/ |
|
Lines 411-416
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
Link Here
|
| 411 |
|
527 |
|
| 412 |
if (do_alloc && next_len > 0) { |
528 |
if (do_alloc && next_len > 0) { |
| 413 |
char *new_buffer; |
529 |
char *new_buffer; |
|
|
530 |
/* solo */ |
| 531 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 532 |
"ap_rgetline_core: (do_alloc && next_len > 0) is TRUE, r->the_request='%s'", r->the_request); |
| 533 |
/* */ |
| 414 |
apr_size_t new_size = bytes_handled + next_len + 1; |
534 |
apr_size_t new_size = bytes_handled + next_len + 1; |
| 415 |
|
535 |
|
| 416 |
/* we need to alloc an extra byte for a null */ |
536 |
/* we need to alloc an extra byte for a null */ |
|
Lines 429-440
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
Link Here
|
| 429 |
} |
549 |
} |
| 430 |
} |
550 |
} |
| 431 |
else { /* next character is not tab or space */ |
551 |
else { /* next character is not tab or space */ |
|
|
552 |
/* solo */ |
| 553 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 554 |
"ap_rgetline_core: (c == APR_ASCII_BLANK || c == APR_ASCII_TAB) is FALSE, r->the_request='%s'", r->the_request); |
| 555 |
/* */ |
| 432 |
break; |
556 |
break; |
| 433 |
} |
557 |
} |
| 434 |
} |
558 |
} |
| 435 |
} |
559 |
} |
| 436 |
|
560 |
|
| 437 |
*read = bytes_handled; |
561 |
*read = bytes_handled; |
|
|
562 |
/* solo */ |
| 563 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 564 |
"ap_rgetline_core: END, return APR_SUCCESS"); |
| 565 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 566 |
"ap_rgetline_core: END, return APR_SUCCESS r->the_request='%s'", r->the_request); |
| 567 |
/* */ |
| 438 |
return APR_SUCCESS; |
568 |
return APR_SUCCESS; |
| 439 |
} |
569 |
} |
| 440 |
|
570 |
|
|
Lines 566-571
static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
Link Here
|
| 566 |
apr_size_t len; |
696 |
apr_size_t len; |
| 567 |
int num_blank_lines = 0; |
697 |
int num_blank_lines = 0; |
| 568 |
int max_blank_lines = r->server->limit_req_fields; |
698 |
int max_blank_lines = r->server->limit_req_fields; |
|
|
699 |
/* solo */ |
| 700 |
server_rec * ss = r->server; |
| 701 |
|
| 702 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 703 |
"read_request_line: START"); |
| 704 |
/* */ |
| 569 |
|
705 |
|
| 570 |
if (max_blank_lines <= 0) { |
706 |
if (max_blank_lines <= 0) { |
| 571 |
max_blank_lines = DEFAULT_LIMIT_REQUEST_FIELDS; |
707 |
max_blank_lines = DEFAULT_LIMIT_REQUEST_FIELDS; |
|
Lines 588-593
static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
Link Here
|
| 588 |
|
724 |
|
| 589 |
do { |
725 |
do { |
| 590 |
apr_status_t rv; |
726 |
apr_status_t rv; |
|
|
727 |
/* solo */ |
| 728 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 729 |
"read_request_line: loop, num_blank_lines=%d", num_blank_lines); |
| 730 |
/* */ |
| 591 |
|
731 |
|
| 592 |
/* insure ap_rgetline allocates memory each time thru the loop |
732 |
/* insure ap_rgetline allocates memory each time thru the loop |
| 593 |
* if there are empty lines |
733 |
* if there are empty lines |
|
Lines 595-600
static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
Link Here
|
| 595 |
r->the_request = NULL; |
735 |
r->the_request = NULL; |
| 596 |
rv = ap_rgetline(&(r->the_request), (apr_size_t)(r->server->limit_req_line + 2), |
736 |
rv = ap_rgetline(&(r->the_request), (apr_size_t)(r->server->limit_req_line + 2), |
| 597 |
&len, r, 0, bb); |
737 |
&len, r, 0, bb); |
|
|
738 |
/* solo */ |
| 739 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 740 |
"read_request_line: loop, r->the_request='%s'", r->the_request); |
| 741 |
/* */ |
| 598 |
|
742 |
|
| 599 |
if (rv != APR_SUCCESS) { |
743 |
if (rv != APR_SUCCESS) { |
| 600 |
r->request_time = apr_time_now(); |
744 |
r->request_time = apr_time_now(); |
|
Lines 616-621
static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
Link Here
|
| 616 |
|
760 |
|
| 617 |
r->request_time = apr_time_now(); |
761 |
r->request_time = apr_time_now(); |
| 618 |
ll = r->the_request; |
762 |
ll = r->the_request; |
|
|
763 |
/* solo */ |
| 764 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 765 |
"read_request_line: first, ll='%s'", ll); |
| 766 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 767 |
"read_request_line: first, ll[0]=%d", ll[0]); |
| 768 |
/* */ |
| 619 |
r->method = ap_getword_white(r->pool, &ll); |
769 |
r->method = ap_getword_white(r->pool, &ll); |
| 620 |
|
770 |
|
| 621 |
#if 0 |
771 |
#if 0 |
|
Lines 627-632
static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
Link Here
|
| 627 |
#endif |
777 |
#endif |
| 628 |
|
778 |
|
| 629 |
uri = ap_getword_white(r->pool, &ll); |
779 |
uri = ap_getword_white(r->pool, &ll); |
|
|
780 |
/* solo */ |
| 781 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 782 |
"read_request_line: post 'uri = ap_getword_white(r->pool, &ll)', ll='%s'", ll); |
| 783 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 784 |
"read_request_line: post 'uri = ap_getword_white(r->pool, &ll)', ll[0]=%d", ll[0]); |
| 785 |
/* */ |
| 630 |
|
786 |
|
| 631 |
/* Provide quick information about the request method as soon as known */ |
787 |
/* Provide quick information about the request method as soon as known */ |
| 632 |
|
788 |
|
|
Lines 636-647
static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
Link Here
|
| 636 |
} |
792 |
} |
| 637 |
|
793 |
|
| 638 |
ap_parse_uri(r, uri); |
794 |
ap_parse_uri(r, uri); |
|
|
795 |
/* solo */ |
| 796 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 797 |
"read_request_line: post 'ap_parse_uri(r, uri)', ll='%s'", ll); |
| 798 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 799 |
"read_request_line: post 'ap_parse_uri(r, uri)', ll[0]=%d", ll[0]); |
| 800 |
/* */ |
| 639 |
|
801 |
|
| 640 |
if (ll[0]) { |
802 |
if (ll[0]) { |
|
|
803 |
/* solo */ |
| 804 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 805 |
"read_request_line: (ll[0]) is TRUE"); |
| 806 |
/* */ |
| 641 |
r->assbackwards = 0; |
807 |
r->assbackwards = 0; |
| 642 |
pro = ll; |
808 |
pro = ll; |
| 643 |
len = strlen(ll); |
809 |
len = strlen(ll); |
| 644 |
} else { |
810 |
} else { |
|
|
811 |
/* solo */ |
| 812 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 813 |
"read_request_line: (ll[0]) is FALSE"); |
| 814 |
/* */ |
| 645 |
r->assbackwards = 1; |
815 |
r->assbackwards = 1; |
| 646 |
pro = "HTTP/0.9"; |
816 |
pro = "HTTP/0.9"; |
| 647 |
len = 8; |
817 |
len = 8; |
|
Lines 664-669
static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
Link Here
|
| 664 |
else |
834 |
else |
| 665 |
r->proto_num = HTTP_VERSION(1, 0); |
835 |
r->proto_num = HTTP_VERSION(1, 0); |
| 666 |
|
836 |
|
|
|
837 |
/* solo */ |
| 838 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ss, |
| 839 |
"read_request_line: END, return 1"); |
| 840 |
/* */ |
| 667 |
return 1; |
841 |
return 1; |
| 668 |
} |
842 |
} |
| 669 |
|
843 |
|