| 1 |
|
| MODULE = Protocol::HTTP PACKAGE = Protocol::HTTP::ResponseParser |
| 2 |
|
| PROTOTYPES: DISABLE |
| 3 |
|
| |
| 4 |
0 |
| ResponseParser* ResponseParser::new () |
| 5 |
0 |
▶ | |
Branch: 1 branch
| Branch | True | False | Total |
|
0 |
0 |
0 |
|
| 6 |
0 |
▶ | RequestSP ResponseParser::context_request () |
Branch: 4 branches
| Branch | True | False | Total |
| RequestSP ResponseParser::context_request () |
0 |
0 |
0 |
| RequestSP ResponseParser::context_request () |
0 |
0 |
0 |
| RequestSP ResponseParser::context_request () |
0 |
0 |
0 |
| RequestSP ResponseParser::context_request () |
0 |
0 |
0 |
|
| 7 |
0 |
| |
| 8 |
0 |
▶ | void ResponseParser::set_context_request (Request* req) |
Branch: 1 branch
| Branch | True | False | Total |
| void ResponseParser::set_context_request (Request* req) |
0 |
0 |
0 |
|
| 9 |
|
| |
| 10 |
|
| void ResponseParser::parse (const string& buf) : ALIAS(parse_shift=1) { |
| 11 |
0 |
▶ | if (ix && !buf) XSRETURN_EMPTY; // make "while(my(...) = $p->parse_shift($s)) {}" stop when string is fully parsed |
Branch: 3 branches
| Branch | True | False | Total |
| if (ix && !buf) XSRETURN_EMPTY; // make "while(my(...) = $p->parse_shift($s)) {}" stop when string is fully parsed |
0 |
0 |
0 |
| if (ix && !buf) XSRETURN_EMPTY; // make "while(my(...) = $p->parse_shift($s)) {}" stop when string is fully parsed |
0 |
0 |
0 |
| if (ix && !buf) XSRETURN_EMPTY; // make "while(my(...) = $p->parse_shift($s)) {}" stop when string is fully parsed |
0 |
0 |
0 |
|
| 12 |
0 |
▶ | auto result = THIS->parse(buf); |
Branch: 1 branch
| Branch | True | False | Total |
| auto result = THIS->parse(buf); |
0 |
0 |
0 |
|
| 13 |
0 |
| SV* bufsv = ST(1); |
| 14 |
0 |
▶ | EXTEND(SP, 4); |
Branch: 2 branches
| Branch | True | False | Total |
| EXTEND(SP, 4); |
0 |
0 |
0 |
| EXTEND(SP, 4); |
0 |
0 |
0 |
|
| 15 |
|
| |
| 16 |
0 |
▶ | mPUSHs(xs::out(result.response).detach()); |
Branch: 2 branches
| Branch | True | False | Total |
| mPUSHs(xs::out(result.response).detach()); |
0 |
0 |
0 |
| mPUSHs(xs::out(result.response).detach()); |
0 |
0 |
0 |
|
| 17 |
0 |
▶ | mPUSHs(xs::out(result.state).detach()); |
Branch: 2 branches
| Branch | True | False | Total |
| mPUSHs(xs::out(result.state).detach()); |
0 |
0 |
0 |
| mPUSHs(xs::out(result.state).detach()); |
0 |
0 |
0 |
|
| 18 |
|
| |
| 19 |
0 |
▶ | if (ix) sv_insert(bufsv, 0, result.position, "", 0); |
Branch: 2 branches
| Branch | True | False | Total |
| if (ix) sv_insert(bufsv, 0, result.position, "", 0); |
0 |
0 |
0 |
| if (ix) sv_insert(bufsv, 0, result.position, "", 0); |
0 |
0 |
0 |
|
| 20 |
0 |
▶ | else mPUSHu(result.position); |
Branch: 2 branches
| Branch | True | False | Total |
| else mPUSHu(result.position); |
0 |
0 |
0 |
| else mPUSHu(result.position); |
0 |
0 |
0 |
|
| 21 |
|
| |
| 22 |
0 |
▶ | if (result.error) mPUSHs(xs::out(result.error).detach()); |
Branch: 3 branches
| Branch | True | False | Total |
| if (result.error) mPUSHs(xs::out(result.error).detach()); |
0 |
0 |
0 |
| if (result.error) mPUSHs(xs::out(result.error).detach()); |
0 |
0 |
0 |
| if (result.error) mPUSHs(xs::out(result.error).detach()); |
0 |
0 |
0 |
|
| 23 |
|
| } |
| 24 |
|
| |
| 25 |
|
| void ResponseParser::eof () { |
| 26 |
0 |
▶ | auto result = THIS->eof(); |
Branch: 1 branch
| Branch | True | False | Total |
| auto result = THIS->eof(); |
0 |
0 |
0 |
|
| 27 |
0 |
▶ | EXTEND(SP, 3); |
Branch: 2 branches
| Branch | True | False | Total |
| EXTEND(SP, 3); |
0 |
0 |
0 |
| EXTEND(SP, 3); |
0 |
0 |
0 |
|
| 28 |
|
| |
| 29 |
0 |
▶ | mPUSHs(xs::out(result.response).detach()); |
Branch: 2 branches
| Branch | True | False | Total |
| mPUSHs(xs::out(result.response).detach()); |
0 |
0 |
0 |
| mPUSHs(xs::out(result.response).detach()); |
0 |
0 |
0 |
|
| 30 |
0 |
▶ | mPUSHs(xs::out(result.state).detach()); |
Branch: 2 branches
| Branch | True | False | Total |
| mPUSHs(xs::out(result.state).detach()); |
0 |
0 |
0 |
| mPUSHs(xs::out(result.state).detach()); |
0 |
0 |
0 |
|
| 31 |
|
| |
| 32 |
0 |
▶ | if (result.error) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (result.error) { |
0 |
0 |
0 |
|
| 33 |
0 |
| PUSHs(&PL_sv_undef); |
| 34 |
0 |
▶ | mPUSHs(xs::out(result.error).detach()); |
Branch: 2 branches
| Branch | True | False | Total |
| mPUSHs(xs::out(result.error).detach()); |
0 |
0 |
0 |
| mPUSHs(xs::out(result.error).detach()); |
0 |
0 |
0 |
|
| 35 |
|
| } |
| 36 |
|
| } |
| 37 |
|
| |
| 38 |
0 |
| void ResponseParser::reset () |
| 39 |
|
| |
| 40 |
|
| SV* CLONE_SKIP (...) { |
| 41 |
0 |
| XSRETURN_YES; |
| 42 |
|
| PERL_UNUSED_VAR(items); |
| 43 |
|
| } |