diff options
| author | 2007-08-19 11:03:27 +0000 | |
|---|---|---|
| committer | 2007-08-19 11:03:27 +0000 | |
| commit | 05c95857273e6c68ca05ee786948c455ac7d3d39 (patch) | |
| tree | 9dbfd12c93bc6aef66c13f552e83f3f7fe93783e /src/modules/m_rpc_json.cpp | |
| parent | Improved compatibility with the JSON-RPC specification; beware, major overhau... (diff) | |
Added proper header handling, persistant connections, and working timeouts to m_httpd
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7743 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_rpc_json.cpp')
| -rw-r--r-- | src/modules/m_rpc_json.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_rpc_json.cpp b/src/modules/m_rpc_json.cpp index c0e4e14d9..44c1726ec 100644 --- a/src/modules/m_rpc_json.cpp +++ b/src/modules/m_rpc_json.cpp @@ -82,8 +82,10 @@ class ModuleRpcJson : public Module } /* Send the document back to m_httpd */ - HTTPDocument response(http->sock, &data, 200, "X-Powered-By: m_rpc_json.so\r\n" - "Content-Type: application/json; charset=iso-8859-1\r\n"); + HTTPDocument response(http->sock, &data, 200); + response.headers.SetHeader("X-Powered-By", "m_rpc_json.so"); + response.headers.SetHeader("Content-Type", "application/json; charset=iso-8859-1"); + response.headers.SetHeader("Connection", "Keep-Alive"); Request req((char*)&response, (Module*)this, event->GetSource()); req.Send(); } |
