[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-421
From: |
Giuseppe Scrivano |
Subject: |
[myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-421-g861e1b0 |
Date: |
Fri, 28 Jan 2011 13:16:54 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".
The branch, master has been updated
via 861e1b03871e68f677878810059e1b76db0f00a4 (commit)
from 8530b3e4b9dbed974d50a62d413bae48fed98ae7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 861e1b03871e68f677878810059e1b76db0f00a4
Author: Giuseppe Scrivano <address@hidden>
Date: Fri Jan 28 14:17:37 2011 +0100
Http: Fix a possible memory leak.
diff --git a/myserver/include/protocol/http/http_header.h
b/myserver/include/protocol/http/http_header.h
index e4c30e1..2fb2152 100644
--- a/myserver/include/protocol/http/http_header.h
+++ b/myserver/include/protocol/http/http_header.h
@@ -40,7 +40,7 @@ public:
{
}
- Entry (string& n, string& v) : name (NULL), value (NULL)
+ Entry (const string &n, const string &v) : name (NULL), value (NULL)
{
name.assign (n);
value.assign (v);
diff --git a/myserver/src/protocol/http/http_data_read.cpp
b/myserver/src/protocol/http/http_data_read.cpp
index 5ce40d9..a381cf4 100644
--- a/myserver/src/protocol/http/http_data_read.cpp
+++ b/myserver/src/protocol/http/http_data_read.cpp
@@ -255,11 +255,12 @@ int HttpDataRead::readPostData (HttpThreadContext* td,
int* httpRetCode)
td->request.other.get ("transfer-encoding");
/* Specify a type if it not specified by the client. */
- if (contentType == 0)
+ if (contentType == NULL)
{
- contentType = new HttpRequestHeader::Entry ();
- contentType->name.assign ("content-type");
- contentType->value.assign ("application/x-www-form-urlencoded");
+ contentType = new HttpRequestHeader::Entry ("content-type",
+
"application/x-www-form-urlencoded");
+ td->request.other.put (contentType->name, contentType);
+
}
else if (contentType->value.length () == 0)
contentType->value.assign ("application/x-www-form-urlencoded");
-----------------------------------------------------------------------
Summary of changes:
myserver/include/protocol/http/http_header.h | 2 +-
myserver/src/protocol/http/http_data_read.cpp | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
hooks/post-receive
--
GNU MyServer
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-421-g861e1b0,
Giuseppe Scrivano <=