Commit 482478d4 authored by Nils Goroll's avatar Nils Goroll

whitespace

parent 3d71fab9
...@@ -60,8 +60,8 @@ const char *DCS_GetHdr(dcs_ctx *ctx, const struct gethdr_s *hdr) { ...@@ -60,8 +60,8 @@ const char *DCS_GetHdr(dcs_ctx *ctx, const struct gethdr_s *hdr) {
#else /* VARNISH_MAJOR == 3 */ #else /* VARNISH_MAJOR == 3 */
struct gethdr_s { struct gethdr_s {
enum gethdr_e where; enum gethdr_e where;
const char *what; const char *what;
}; };
typedef struct sess dcs_ctx; typedef struct sess dcs_ctx;
...@@ -155,7 +155,7 @@ dcs_varnish_classify(dcs_ctx *ctx) { ...@@ -155,7 +155,7 @@ dcs_varnish_classify(dcs_ctx *ctx) {
appnd(w, space, ua, l); appnd(w, space, ua, l);
} while(0); } while(0);
ua = uabuf; ua = uabuf;
for (i = 0; i < DCS_VARNISH2_NHDRS; i++) { for (i = 0; i < DCS_VARNISH2_NHDRS; i++) {
r = DCS_GetHdr(ctx, &hdrs[i]); r = DCS_GetHdr(ctx, &hdrs[i]);
if (r && *r) { if (r && *r) {
......
...@@ -7,16 +7,16 @@ server s1 { ...@@ -7,16 +7,16 @@ server s1 {
txresp txresp
} -start } -start
varnish v1 -vcl+backend { varnish v1 -vcl+backend {
import dcs from "${vmod_topbuild}/src/.libs/libvmod_dcs.so"; import dcs from "${vmod_topbuild}/src/.libs/libvmod_dcs.so";
sub vcl_recv { sub vcl_recv {
# this code will classify # this code will classify
# #
# for best performance in production, only call classify # for best performance in production, only call classify
# once or use inline-C to save the return value of # once or use inline-C to save the return value of
# classify (int) # classify (int)
# exotic use cases # exotic use cases
set req.http.xx-entry-key = dcs.entry_key(dcs.classify()); set req.http.xx-entry-key = dcs.entry_key(dcs.classify());
set req.http.xx-type-id = dcs.type_id(dcs.classify()); set req.http.xx-type-id = dcs.type_id(dcs.classify());
...@@ -65,7 +65,7 @@ client c1 { ...@@ -65,7 +65,7 @@ client c1 {
client c1 { client c1 {
txreq -hdr "User-Agent: Opera/9.80 (Android; Opera Mini/19.0.1340/34.1309; U; de) Presto/2.8.119 Version/11.10" \ txreq -hdr "User-Agent: Opera/9.80 (Android; Opera Mini/19.0.1340/34.1309; U; de) Presto/2.8.119 Version/11.10" \
-hdr "X-OperaMini-Phone-UA: Mozilla/5.0 (Linux; U; Android 4.3; de-de; ME302C Build/JSS15Q) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30" -hdr "X-OperaMini-Phone-UA: Mozilla/5.0 (Linux; U; Android 4.3; de-de; ME302C Build/JSS15Q) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.xx-entry-key == "android*me302c" expect resp.http.xx-entry-key == "android*me302c"
...@@ -74,4 +74,3 @@ client c1 { ...@@ -74,4 +74,3 @@ client c1 {
expect resp.http.x-nb-classified == "Tablet" expect resp.http.x-nb-classified == "Tablet"
expect resp.http.X-DeviceClass == "tablet" expect resp.http.X-DeviceClass == "tablet"
} -run } -run
...@@ -65,7 +65,7 @@ client c1 { ...@@ -65,7 +65,7 @@ client c1 {
client c1 { client c1 {
txreq -hdr "User-Agent: Opera/9.80 (Android; Opera Mini/19.0.1340/34.1309; U; de) Presto/2.8.119 Version/11.10" \ txreq -hdr "User-Agent: Opera/9.80 (Android; Opera Mini/19.0.1340/34.1309; U; de) Presto/2.8.119 Version/11.10" \
-hdr "X-OperaMini-Phone-UA: Mozilla/5.0 (Linux; U; Android 4.3; de-de; ME302C Build/JSS15Q) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30" -hdr "X-OperaMini-Phone-UA: Mozilla/5.0 (Linux; U; Android 4.3; de-de; ME302C Build/JSS15Q) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.xx-entry-key == "android*me302c" expect resp.http.xx-entry-key == "android*me302c"
...@@ -74,4 +74,3 @@ client c1 { ...@@ -74,4 +74,3 @@ client c1 {
expect resp.http.x-nb-classified == "Tablet" expect resp.http.x-nb-classified == "Tablet"
expect resp.http.X-DeviceClass == "tablet" expect resp.http.X-DeviceClass == "tablet"
} -run } -run
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment