]> git.pld-linux.org Git - packages/squid.git/blob - squid-2.5.STABLE4-icon_urls.patch
- typo
[packages/squid.git] / squid-2.5.STABLE4-icon_urls.patch
1 Index: squid/src/cf.data.pre
2 diff -c squid/src/cf.data.pre:1.245.2.55 squid/src/cf.data.pre:1.245.2.56
3 *** squid/src/cf.data.pre:1.245.2.55    Sat Dec  6 10:19:36 2003
4 --- squid/src/cf.data.pre       Sun Dec 14 06:33:44 2003
5 ***************
6 *** 3112,3117 ****
7 --- 3112,3128 ----
8         @DEFAULT_ICON_DIR@
9   DOC_END
10   
11 + NAME: short_icon_urls
12 + TYPE: onoff
13 + LOC: Config.icons.use_short_names
14 + DEFAULT: off
15 + DOC_START
16 +       If this is enabled then Squid will use short URLs for icons.
17
18 +       If off then the URLs for icons will always be absolute URLs
19 +       including the proxy name and port.
20 + DOC_END
21
22   NAME: error_directory
23   TYPE: string
24   LOC: Config.errorDirectory
25 Index: squid/src/client_side.c
26 diff -c squid/src/client_side.c:1.561.2.47 squid/src/client_side.c:1.561.2.48
27 *** squid/src/client_side.c:1.561.2.47  Sun Dec 14 05:30:35 2003
28 --- squid/src/client_side.c     Sun Dec 14 06:33:46 2003
29 ***************
30 *** 3044,3049 ****
31 --- 3044,3051 ----
32                         http->flags.internal = 1;
33                     }
34                 }
35 +               if (http->flags.internal)
36 +                   request->protocol = PROTO_HTTP;
37             }
38             /*
39              * cache the Content-length value in request_t.
40 Index: squid/src/mime.c
41 diff -c squid/src/mime.c:1.102.2.2 squid/src/mime.c:1.102.2.3
42 *** squid/src/mime.c:1.102.2.2  Sat Nov  9 21:43:31 2002
43 --- squid/src/mime.c    Sun Dec 14 06:33:47 2003
44 ***************
45 *** 219,228 ****
46   const char *
47   mimeGetIconURL(const char *fn)
48   {
49       char *icon = mimeGetIcon(fn);
50       if (icon == NULL)
51         return null_string;
52 !     return internalLocalUri("/squid-internal-static/icons/", icon);
53   }
54   
55   char *
56 --- 219,235 ----
57   const char *
58   mimeGetIconURL(const char *fn)
59   {
60 +     static MemBuf mb = MemBufNULL;
61       char *icon = mimeGetIcon(fn);
62       if (icon == NULL)
63         return null_string;
64 !     if (Config.icons.use_short_names) {
65 !       memBufReset(&mb);
66 !       memBufPrintf(&mb, "/squid-internal-static/icons/%s", icon);
67 !       return mb.buf;
68 !     } else {
69 !       return internalLocalUri("/squid-internal-static/icons/", icon);
70 !     }
71   }
72   
73   char *
74 Index: squid/src/structs.h
75 diff -c squid/src/structs.h:1.408.2.17 squid/src/structs.h:1.408.2.18
76 *** squid/src/structs.h:1.408.2.17      Sat Dec  6 10:19:38 2003
77 --- squid/src/structs.h Sun Dec 14 06:33:47 2003
78 ***************
79 *** 636,641 ****
80 --- 636,642 ----
81       } cacheSwap;
82       struct {
83         char *directory;
84 +       int use_short_names;
85       } icons;
86       char *errorDirectory;
87       struct {
This page took 0.031931 seconds and 3 git commands to generate.