~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to src/store_key_md5.cc

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2009-09-24 14:51:06 UTC
  • mfrom: (1.1.12 upstream)
  • mto: (20.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20090924145106-38jgrzmj0d73pha5
Tags: 3.1.0.13-1
* Upload to experimental

* New upstream release
  - Fixes Follow-X-Forwarded-For support (Closes: #523943)
  - Adds IPv6 support (Closes: #432351)

* debian/rules
  - Removed obsolete configuration options
  - Enable db and radius basic authentication modules

* debian/patches/01-cf.data.debian
  - Adapted to new upstream version

* debian/patches/02-makefile-defaults
  - Adapted to new upstream version

* debian/{squid.postinst,squid.rc,README.Debian,watch}
  - Updated references to squid 3.1

* debian/squid3.install
  - Install CSS file for error pages
  - Install manual pages for new authentication modules

* debian/squid3-common.install
  - Install documented version of configuration file in /usr/share/doc/squid3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
/*
3
 
 * $Id: store_key_md5.cc,v 1.36 2007/11/15 16:47:35 wessels Exp $
 
3
 * $Id$
4
4
 *
5
5
 * DEBUG: section 20    Storage Manager MD5 Cache Keys
6
6
 * AUTHOR: Duane Wessels
21
21
 *  it under the terms of the GNU General Public License as published by
22
22
 *  the Free Software Foundation; either version 2 of the License, or
23
23
 *  (at your option) any later version.
24
 
 *  
 
24
 *
25
25
 *  This program is distributed in the hope that it will be useful,
26
26
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
27
27
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28
28
 *  GNU General Public License for more details.
29
 
 *  
 
29
 *
30
30
 *  You should have received a copy of the GNU General Public License
31
31
 *  along with this program; if not, write to the Free Software
32
32
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
99
99
}
100
100
 
101
101
const cache_key *
102
 
storeKeyPrivate(const char *url, method_t method, int id)
 
102
storeKeyPrivate(const char *url, const HttpRequestMethod& method, int id)
103
103
{
104
104
    static cache_key digest[SQUID_MD5_DIGEST_LENGTH];
105
105
    SquidMD5_CTX M;
106
106
    assert(id > 0);
107
 
    debugs(20, 3, "storeKeyPrivate: " << RequestMethodStr[method] << " " << url);
 
107
    debugs(20, 3, "storeKeyPrivate: " << RequestMethodStr(method) << " " << url);
108
108
    SquidMD5Init(&M);
109
109
    SquidMD5Update(&M, (unsigned char *) &id, sizeof(id));
110
110
    SquidMD5Update(&M, (unsigned char *) &method, sizeof(method));
114
114
}
115
115
 
116
116
const cache_key *
117
 
storeKeyPublic(const char *url, const method_t method)
 
117
storeKeyPublic(const char *url, const HttpRequestMethod& method)
118
118
{
119
119
    static cache_key digest[SQUID_MD5_DIGEST_LENGTH];
120
 
    unsigned char m = (unsigned char) method;
 
120
    unsigned char m = (unsigned char) method.id();
121
121
    SquidMD5_CTX M;
122
122
    SquidMD5Init(&M);
123
123
    SquidMD5Update(&M, &m, sizeof(m));
133
133
}
134
134
 
135
135
const cache_key *
136
 
storeKeyPublicByRequestMethod(HttpRequest * request, const method_t method)
 
136
storeKeyPublicByRequestMethod(HttpRequest * request, const HttpRequestMethod& method)
137
137
{
138
138
    static cache_key digest[SQUID_MD5_DIGEST_LENGTH];
139
 
    unsigned char m = (unsigned char) method;
 
139
    unsigned char m = (unsigned char) method.id();
140
140
    const char *url = urlCanonical(request);
141
141
    SquidMD5_CTX M;
142
142
    SquidMD5Init(&M);