| 43 | char url[256]; |
| 44 | |
| 45 | bool |
| 46 | should_push(TSHttpTxn txnp) |
| 47 | { |
| 48 | TSMBuffer mbuf; |
| 49 | TSMLoc hdr, in_url; |
| 50 | if (TSHttpTxnClientReqGet(txnp, &mbuf, &hdr) != TS_SUCCESS) { |
| 51 | return false; |
| 52 | } |
| 53 | if (TSHttpHdrUrlGet(mbuf, hdr, &in_url) != TS_SUCCESS) { |
| 54 | return false; |
| 55 | } |
| 56 | int len; |
| 57 | TSUrlHttpQueryGet(mbuf, in_url, &len); |
| 58 | TSHandleMLocRelease(mbuf, hdr, in_url); |
| 59 | TSHandleMLocRelease(mbuf, TS_NULL_MLOC, hdr); |
| 60 | if (len > 0) { |
| 61 | return true; |
| 62 | } else { |
| 63 | return false; |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | static int |
| 68 | server_push_plugin(TSCont contp, TSEvent event, void *edata) |
no test coverage detected