~chtsanti/squid/icap-max-connections

« back to all changes in this revision

Viewing changes to src/http.cc

  • Committer: Christos Tsantilas
  • Date: 2009-02-18 22:18:35 UTC
  • mfrom: (9294.1.215 trunk)
  • Revision ID: chtsanti@users.sourceforge.net-20090218221835-lfxxe3bs8uhu0b1h
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1542
1542
        } else if (strcmp(orig_request->peer_login, "PASS") == 0) {
1543
1543
            if (orig_request->extacl_user.size() && orig_request->extacl_passwd.size()) {
1544
1544
                char loginbuf[256];
1545
 
                snprintf(loginbuf, sizeof(loginbuf), "%.*s:%.*s",
1546
 
                    orig_request->extacl_user.size(),
1547
 
                    orig_request->extacl_user.rawBuf(),
1548
 
                    orig_request->extacl_passwd.size(),
1549
 
                    orig_request->extacl_passwd.rawBuf());
 
1545
                snprintf(loginbuf, sizeof(loginbuf), SQUIDSTRINGPH ":" SQUIDSTRINGPH,
 
1546
                    SQUIDSTRINGPRINT(orig_request->extacl_user),
 
1547
                    SQUIDSTRINGPRINT(orig_request->extacl_passwd));
1550
1548
                httpHeaderPutStrf(hdr_out, HDR_PROXY_AUTHORIZATION, "Basic %s",
1551
1549
                                  base64_encode(loginbuf));
1552
1550
            }
1573
1571
                hdr_out->putStr(HDR_AUTHORIZATION, auth);
1574
1572
            } else if (orig_request->extacl_user.size() && orig_request->extacl_passwd.size()) {
1575
1573
                char loginbuf[256];
1576
 
                snprintf(loginbuf, sizeof(loginbuf), "%.*s:%.*s",
1577
 
                    orig_request->extacl_user.size(),
1578
 
                    orig_request->extacl_user.rawBuf(),
1579
 
                    orig_request->extacl_passwd.size(),
1580
 
                    orig_request->extacl_passwd.rawBuf());
 
1574
                snprintf(loginbuf, sizeof(loginbuf), SQUIDSTRINGPH ":" SQUIDSTRINGPH,
 
1575
                    SQUIDSTRINGPRINT(orig_request->extacl_user),
 
1576
                    SQUIDSTRINGPRINT(orig_request->extacl_passwd));
1581
1577
                httpHeaderPutStrf(hdr_out, HDR_AUTHORIZATION, "Basic %s",
1582
1578
                                  base64_encode(loginbuf));
1583
1579
            }
1808
1804
         * pass on all other header fields
1809
1805
         * which are NOT listed by the special Connection: header. */
1810
1806
 
1811
 
        if (strConnection.size()>0 && strListIsMember(&strConnection, e->name.unsafeBuf(), ',')) {
 
1807
        if (strConnection.size()>0 && strListIsMember(&strConnection, e->name.termedBuf(), ',')) {
1812
1808
            debugs(11, 2, "'" << e->name << "' header cropped by Connection: definition");
1813
1809
            return;
1814
1810
        }