This is only for www-authenticate, not for Authentication-Info
| 415 | |
| 416 | // This is only for www-authenticate, not for Authentication-Info |
| 417 | void parseAuthenticate(string stuff, SipParamList ¶ms) |
| 418 | { |
| 419 | SipParseLine parser(stuff.c_str()); |
| 420 | |
| 421 | try { |
| 422 | string challengeType = parser.scanToken(); |
| 423 | if (! strceql(challengeType,"Digest")) { |
| 424 | LOG(ERR) << format("unrecognized challenge type:%s",challengeType.c_str()); |
| 425 | return; |
| 426 | } |
| 427 | |
| 428 | do { |
| 429 | SipParam param; |
| 430 | if (! parser.scanGenericParam(param)) break; |
| 431 | params.push_back(param); |
| 432 | } while (parser.scanChar(',')); |
| 433 | } catch(SipParseError) { |
| 434 | // error was already logged. |
| 435 | LOG(DEBUG) << "Caught SIP Parse error"; |
| 436 | return; |
| 437 | } |
| 438 | } |
| 439 | |
| 440 | // You can pass in the comma-separated list of vias and it will parse just the first. |
| 441 | void SipVia::viaParse(string vialine) |
no test coverage detected