Skip to content

Allow spaces in argument values. #1

Closed
wants to merge 1 commit into from
View
10 README
@@ -32,6 +32,16 @@ becomes:
http://mysite.com/rrdtool--start%20now-300s%20--end%20now%20DEF%3Ads0%3Dtest.rrd%3Areading%3AAVERAGE%20LINE1%3Ads0%2300FF00
+Spaces can be inlcuded in argument values by using the tilde character.
+For example, the title of the following example will be rendered as
+"Test Graph":
+
+ rrdtool graph --start now-300s \
+ --end now \
+ --tile Test~Graph \
+ DEF:ds0=test.rrd:reading:AVERAGE \
+ LINE1:ds0#00FF00
+
The module supports all the features of your copy of RRDtool. It can output
PNG, PDF, SVG, and EPS graphics (see the --imgformat option of rrdgraph(1)).
View
2 ngx_http_rrd_graph_module.c
@@ -189,6 +189,8 @@ ngx_http_rrd_graph_parse_uri(ngx_http_request_t *r, int *argc_ptr,
*p = '\0';
argv[argc++] = p+1;
} else {
+ if (*p == '~')
+ *p = ' ';
argv_len[argc-1]++;
}
p++;
Something went wrong with that request. Please try again.