Ignore:
Timestamp:
Nov 3, 2007 1:46:03 AM (16 years ago)
Author:
bennylp
Message:

Ticket #410: Endless authentication retries when 401/407 response contains no challenge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_auth_client.c

    r1514 r1539  
    902902    pjsip_tx_data *tdata; 
    903903    const pjsip_hdr *hdr; 
     904    unsigned chal_cnt; 
    904905    pjsip_via_hdr *via; 
    905906    pj_status_t status; 
     
    922923     */ 
    923924    hdr = rdata->msg_info.msg->hdr.next; 
     925    chal_cnt = 0; 
    924926    while (hdr != &rdata->msg_info.msg->hdr) { 
    925927        pjsip_cached_auth *cached_auth; 
     
    938940 
    939941        hchal = (const pjsip_www_authenticate_hdr*) hdr; 
     942        ++chal_cnt; 
    940943 
    941944        /* Find authentication session for this realm, create a new one 
     
    970973    } 
    971974 
     975    /* Check if challenge is present */ 
     976    if (chal_cnt == 0) 
     977        return PJSIP_EAUTHNOCHAL; 
    972978 
    973979    /* Remove branch param in Via header. */ 
Note: See TracChangeset for help on using the changeset viewer.