[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-184-
From: |
Giuseppe Scrivano |
Subject: |
[myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-184-g9f4b84e |
Date: |
Mon, 19 Apr 2010 22:06:08 +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 9f4b84ec3a460ab500526b18d7d2649e8c5a3b46 (commit)
via 890538007da5154d89a632abac3891048074821d (commit)
from 6f83a5af73d6a3d9a9abc31db0541983a2c65715 (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 9f4b84ec3a460ab500526b18d7d2649e8c5a3b46
Author: Giuseppe Scrivano <address@hidden>
Date: Tue Apr 20 00:03:27 2010 +0200
Serve the first HTTP request in the pipeline
diff --git a/myserver/src/protocol/http/http.cpp
b/myserver/src/protocol/http/http.cpp
index 996326b..f76b06a 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -830,6 +830,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*,
u_long, u_long,
int contentLength = -1;
DynamicHttpCommand *dynamicCommand;
bool keepalive = false;
+ bool pipelineData = false;
try
{
@@ -1067,7 +1068,7 @@ int Http::controlConnection (ConnectionPtr a, char*,
char*, u_long, u_long,
u_long toCopy = nbtr - td->nHeaderChars;
a->getConnectionBuffer ()->setBuffer (data, toCopy);
- return ClientsThread::INCOMPLETE_REQUEST_NO_WAIT;
+ pipelineData = true;
}
}
@@ -1161,7 +1162,12 @@ int Http::controlConnection (ConnectionPtr a, char*,
char*, u_long, u_long,
/* Map the HttpDataHandler return value to codes understood by
ClientsThread. */
if (ret == HttpDataHandler::RET_OK && keepalive)
- return ClientsThread::KEEP_CONNECTION;
+ {
+ if (pipelineData)
+ return ClientsThread::INCOMPLETE_REQUEST_NO_WAIT;
+
+ return ClientsThread::KEEP_CONNECTION;
+ }
else
return ClientsThread::DELETE_CONNECTION;
@@ -1173,6 +1179,8 @@ int Http::controlConnection (ConnectionPtr a, char*,
char*, u_long, u_long,
logHTTPaccess ();
return ClientsThread::DELETE_CONNECTION;
}
+
+ return ClientsThread::KEEP_CONNECTION;
}
/*!
commit 890538007da5154d89a632abac3891048074821d
Author: Giuseppe Scrivano <address@hidden>
Date: Tue Apr 20 00:02:47 2010 +0200
If data is available don't wait for new one
diff --git a/myserver/src/server/clients_thread.cpp
b/myserver/src/server/clients_thread.cpp
index e4fc0af..3989647 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -265,8 +265,9 @@ int ClientsThread::controlConnections ()
busy = true;
dataRead = c->getConnectionBuffer ()->getLength ();
- err = c->socket->recv (&((char*)(buffer.getBuffer ()))[dataRead],
- MYSERVER_KB (8) - dataRead - 1, 0);
+ if (! c->isForceControl ())
+ err = c->socket->recv (&((char*)(buffer.getBuffer ()))[dataRead],
+ MYSERVER_KB (8) - dataRead - 1, 0);
if (err == -1 && !server->deleteConnection (c))
return 0;
-----------------------------------------------------------------------
Summary of changes:
myserver/src/protocol/http/http.cpp | 12 ++++++++++--
myserver/src/server/clients_thread.cpp | 5 +++--
2 files changed, 13 insertions(+), 4 deletions(-)
hooks/post-receive
--
GNU MyServer
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-184-g9f4b84e,
Giuseppe Scrivano <=