ext/common/ServerKit/HttpServer.h in passenger-5.0.8 vs ext/common/ServerKit/HttpServer.h in passenger-5.0.9
- old
+ new
@@ -978,14 +978,24 @@
virtual bool supportsUpgrade(Client *client, Request *req) {
return false;
}
+ virtual PassengerLogLevel getClientOutputErrorDisconnectionLogLevel(
+ Client *client, int errcode) const
+ {
+ if (errcode == EPIPE || errcode == ECONNRESET) {
+ return LVL_INFO;
+ } else {
+ return LVL_WARN;
+ }
+ }
+
virtual void reinitializeClient(Client *client, int fd) {
ParentClass::reinitializeClient(client, fd);
client->requestsBegun = 0;
- client->currentRequest = NULL;
+ assert(client->currentRequest == NULL);
}
virtual void reinitializeRequest(Client *client, Request *req) {
req->httpMajor = 1;
req->httpMinor = 0;
@@ -1023,17 +1033,19 @@
psg_lstr_deinit(&req->path);
HeaderTable::Iterator it(req->headers);
while (*it != NULL) {
psg_lstr_deinit(&it->header->key);
+ psg_lstr_deinit(&it->header->origKey);
psg_lstr_deinit(&it->header->val);
it.next();
}
it = HeaderTable::Iterator(req->secureHeaders);
while (*it != NULL) {
psg_lstr_deinit(&it->header->key);
+ psg_lstr_deinit(&it->header->origKey);
psg_lstr_deinit(&it->header->val);
it.next();
}
if (req->pool != NULL && !psg_reset_pool(req->pool, PSG_DEFAULT_POOL_SIZE)) {
@@ -1071,9 +1083,13 @@
ParentClass::compact();
unsigned int count = freeRequestCount;
while (!STAILQ_EMPTY(&freeRequests)) {
Request *request = STAILQ_FIRST(&freeRequests);
+ if (request->pool != NULL) {
+ psg_destroy_pool(request->pool);
+ request->pool = NULL;
+ }
P_ASSERT_EQ(request->httpState, Request::IN_FREELIST);
freeRequestCount--;
STAILQ_REMOVE_HEAD(&freeRequests, nextRequest.freeRequest);
delete request;
}