This routine can be called by tests, from the READ_REQUEST_HDR_HOOK to figure out the id of a test message Returns id/-1 in case of error
| 476 | // to figure out the id of a test message |
| 477 | // Returns id/-1 in case of error |
| 478 | static int |
| 479 | get_request_id(TSHttpTxn txnp) |
| 480 | { |
| 481 | TSMBuffer bufp; |
| 482 | TSMLoc hdr_loc; |
| 483 | int id = -1; |
| 484 | |
| 485 | if (TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) { |
| 486 | return -1; |
| 487 | } |
| 488 | |
| 489 | id = get_request_id_value(X_REQUEST_ID, bufp, hdr_loc); |
| 490 | TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc); |
| 491 | return id; |
| 492 | } |
| 493 | |
| 494 | // This routine can be called by tests, from the READ_RESPONSE_HDR_HOOK |
| 495 | // to figure out the id of a test message |
no test coverage detected