| 30 | { |
| 31 | |
| 32 | void |
| 33 | Context::reset() |
| 34 | { |
| 35 | // Clear the initialized headers before calling next hook |
| 36 | // Note: we don't clear the pristine URL, nor the Remap From/To URLs, they are static. |
| 37 | // We also don't clear the client URL, since it's from the RRI. |
| 38 | if (_client.response.Initialized()) { |
| 39 | _client.response.Reset(); |
| 40 | } |
| 41 | if (_server.response.Initialized()) { |
| 42 | _server.response.Reset(); |
| 43 | } |
| 44 | if (_client.request.Initialized()) { |
| 45 | _client.request.Reset(); |
| 46 | } |
| 47 | if (_server.request.Initialized()) { |
| 48 | _server.request.Reset(); |
| 49 | } |
| 50 | |
| 51 | // Clear the initialized URLs before calling next hook |
| 52 | if (_urls.pristine.Initialized()) { |
| 53 | _urls.pristine.Reset(); |
| 54 | } |
| 55 | if (_urls.cache.Initialized()) { |
| 56 | _urls.cache.Reset(); |
| 57 | } |
| 58 | if (_urls.parent.Initialized()) { |
| 59 | _urls.parent.Reset(); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | Context * |
| 64 | Context::Factory(TSHttpTxn txn_ptr, TSHttpSsn ssn_ptr, TSRemapRequestInfo *rri_ptr, cripts::Instance &inst) |
nothing calls this directly
no test coverage detected