# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../nginx/mod_rrd_graph-0.2.0-0002-remove-quotes.diff
# Copyright (C) 2012 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---

From c7decd718567d46e565125705ee7a42f8befa7a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20Sch=C3=A4fer?= <florian.schaefer@gmail.com>
Date: Fri, 24 Aug 2012 14:00:56 +0200
Subject: [PATCH] Remove the quotation marks around strings from arguments. This prevents displaying the quotation marks in graph images.

---
 ngx_http_rrd_graph_module.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/ngx_http_rrd_graph_module.c b/ngx_http_rrd_graph_module.c
index f43cd7e..d70d207 100644
--- a/ngx_http_rrd_graph_module.c
+++ b/ngx_http_rrd_graph_module.c
@@ -204,6 +204,14 @@ ngx_http_rrd_graph_parse_uri(ngx_http_request_t *r, int *argc_ptr,
         p++;
     }
 
+    for (i = 0; i < argc; i++) {
+        if (*argv[i] == '\"') {
+            argv[i] = argv[i] + 1;
+            argv_len[i] = argv_len[i] - 2;
+            argv[i][argv_len[i]] = '\0';
+        }
+    }
+
     conf = ngx_http_get_module_loc_conf(r, ngx_http_rrd_graph_module);
     /* splice in the RRD directory root */
     /* TODO guard against relative paths */
-- 
1.6.6.2