xs/cors.xs

filter: Statementstmt 100% 3 / 3 Branchbran 50.0% 4 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 63.6% 7 / 11 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« xs/wsroom.xs ↑ Summary xs/validate.xs »
1 MODULE = Punk PACKAGE = Punk::CORS
2  
3 PROTOTYPES: DISABLE
4  
5 # The one piece of the CORS path that cannot be C: a nonblocking handler hands
6 # back a Future, and chaining onto it needs ->then. Punk::CORS::_chain does the
7 # chaining and calls this to do the work (punk_cors.h). Everything else -
8 # preflight and the triplet and streaming shapes - happens in pc_app_cb without
9 # a Perl frame.
10 void
11 _decorate(resp, cfg, allow)
12 SV *resp
13 SV *cfg
14 SV *allow
15 CODE:
16 {
17 2 AV *headers = pco_headers_of(aTHX_ resp);
18 2 ▶ # uncoverable branch false
Branch: 4 branches
BranchTrueFalseTotal
# uncoverable branch false 2 0 2
# uncoverable branch false 2 0 2
# uncoverable branch false 2 0 2
# uncoverable branch false 2 0 2
19 2 # uncoverable condition right count:1 class:ignore_covered_err
20 # uncoverable condition right count:2 class:ignore_covered_err
21 # uncoverable condition right count:3 class:ignore_covered_err
22 # uncoverable condition right count:4 class:ignore_covered_err
23 if (headers && cfg && SvROK(cfg) && SvTYPE(SvRV(cfg)) == SVt_PVHV)
24 pco_add(aTHX_ headers, (HV *)SvRV(cfg), allow);
25 }
« xs/wsroom.xs ↑ Summary xs/validate.xs »