Ignore:
Timestamp:
Sep 27, 2010 8:35:08 AM (14 years ago)
Author:
bennylp
Message:

Implemented and closed #1136: added HTTP authentication support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/samples/httpdemo.c

    r3245 r3321  
    4646static void on_response(pj_http_req *http_req, const pj_http_resp *resp) 
    4747{ 
    48         PJ_UNUSED_ARG(http_req); 
     48    unsigned i; 
     49 
     50    PJ_UNUSED_ARG(http_req); 
    4951    PJ_LOG(3,(THIS_FILE, "%.*s %d %.*s", (int)resp->version.slen, resp->version.ptr, 
    5052                                           resp->status_code, 
    5153                                           (int)resp->reason.slen, resp->reason.ptr)); 
     54 
     55    for (i=0; i<resp->headers.count; ++i) { 
     56        const pj_http_header_elmt *h = &resp->headers.header[i]; 
     57 
     58        if (!pj_stricmp2(&h->name, "Content-Length") || 
     59            !pj_stricmp2(&h->name, "Content-Type")) 
     60        { 
     61            PJ_LOG(3,(THIS_FILE, "%.*s: %.*s", 
     62                      (int)h->name.slen, h->name.ptr, 
     63                      (int)h->value.slen, h->value.ptr)); 
     64        } 
     65    } 
    5266} 
    5367 
Note: See TracChangeset for help on using the changeset viewer.