projects
/
rrdtool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b2de0c
)
src/rrd_daemon.c: Accept \r\n style line endings, too.
author
Florian Forster
<octo@leeloo.home.verplant.org>
Tue, 24 Jun 2008 12:43:15 +0000
(14:43 +0200)
committer
Florian Forster
<octo@leeloo.home.verplant.org>
Tue, 24 Jun 2008 12:43:15 +0000
(14:43 +0200)
src/rrd_daemon.c
patch
|
blob
|
history
diff --git
a/src/rrd_daemon.c
b/src/rrd_daemon.c
index
0e2d2df
..
4def10c
100644
(file)
--- a/
src/rrd_daemon.c
+++ b/
src/rrd_daemon.c
@@
-637,6
+637,14
@@
static int handle_request (int fd) /* {{{ */
RRDD_LOG (LOG_INFO, "handle_request: malformed request.");
return (-1);
}
+
+ /* Accept Windows style line endings, too */
+ if ((buffer_size > 2) && (buffer[buffer_size - 2] == '\r'))
+ {
+ buffer_size--;
+ buffer[buffer_size - 1] = '\n';
+ }
+
/* Place the normal field separator at the end to simplify
* `buffer_get_field's work. */
buffer[buffer_size - 1] = ' ';