Permalink
Browse files

Remove the quotation marks around strings from arguments. This preven…

…ts displaying the quotation marks in graph images.
  • Loading branch information...
fschaefer committed Aug 24, 2012
1 parent a67111a commit c7decd718567d46e565125705ee7a42f8befa7a4
Showing with 8 additions and 0 deletions.
  1. +8 −0 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 */

0 comments on commit c7decd7

Please sign in to comment.