[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-381
From: |
Giuseppe Scrivano |
Subject: |
[myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-381-g5c72956 |
Date: |
Sun, 29 Aug 2010 11:56: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 5c729562268bb36eb9ccd1a11d14e91f7e0ecf8f (commit)
via 59c6a312660cdde1d872f63d914bfca377c52b35 (commit)
via 260c262bfb03250aa6bc426736888e09a11a060f (commit)
from 899954999f452fa3f5ceeed1fa5989452354f18d (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 5c729562268bb36eb9ccd1a11d14e91f7e0ecf8f
Author: Giuseppe Scrivano <address@hidden>
Date: Sun Aug 29 13:46:26 2010 +0200
Http: use HttpHeaders::buildDefaultHTTPResponseHeader only in one place.
diff --git a/myserver/src/protocol/http/http.cpp
b/myserver/src/protocol/http/http.cpp
index 4039deb..18e1df7 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -858,6 +858,8 @@ int Http::controlConnection (ConnectionPtr a, char*, char*,
u_long, u_long,
HttpHeaders::resetHTTPRequest (&td->request);
HttpHeaders::resetHTTPResponse (&td->response);
+ HttpHeaders::buildDefaultHTTPResponseHeader (&(td->response));
+
/* Reset the HTTP status once per request. */
td->response.httpStatus = 200;
@@ -1324,8 +1326,6 @@ int Http::raiseHTTPError (int ID)
td->lastError = ID;
- HttpHeaders::buildDefaultHTTPResponseHeader (&(td->response));
-
if (connection && !stringcmpi (connection->value.c_str (), "keep-alive"))
td->response.setValue ("connection", "keep-alive");
diff --git a/myserver/src/protocol/http/webdav/webdav.cpp
b/myserver/src/protocol/http/webdav/webdav.cpp
index 55b9593..0c425ba 100644
--- a/myserver/src/protocol/http/webdav/webdav.cpp
+++ b/myserver/src/protocol/http/webdav/webdav.cpp
@@ -301,7 +301,6 @@ int WebDAV::propfind (HttpThreadContext* td)
ff->chain (&chain, filters, td->connection->socket, &nbw, 1);
- HttpHeaders::buildDefaultHTTPResponseHeader (&(td->response));
HttpDataHandler::checkDataChunks (td, &keepalive, &useChunks);
td->response.httpStatus = 207;
if (keepalive)
@@ -623,7 +622,6 @@ int WebDAV::lock (HttpThreadContext* td)
ff->chain (&chain, filters, td->connection->socket, &nbw, 1);
- HttpHeaders::buildDefaultHTTPResponseHeader (&(td->response));
HttpDataHandler::checkDataChunks (td, &keepalive, &useChunks);
td->response.httpStatus = 201;
commit 59c6a312660cdde1d872f63d914bfca377c52b35
Author: Giuseppe Scrivano <address@hidden>
Date: Sun Aug 29 11:22:52 2010 +0200
Proxy: check if the protocol is supported using `stringcmpi'.
diff --git a/myserver/src/http_handler/proxy/proxy.cpp
b/myserver/src/http_handler/proxy/proxy.cpp
index c7672b7..c4f9cdd 100644
--- a/myserver/src/http_handler/proxy/proxy.cpp
+++ b/myserver/src/http_handler/proxy/proxy.cpp
@@ -18,6 +18,8 @@
#include "myserver.h"
#include <include/http_handler/proxy/proxy.h>
+#include <include/base/string/stringutils.h>
+
#include <include/protocol/http/http_thread_context.h>
#include <include/protocol/http/http.h>
#include <include/protocol/url.h>
@@ -58,8 +60,7 @@ int Proxy::send (HttpThreadContext *td, const char*
scriptpath,
req.setValue (e->name.c_str (), e->value.c_str ());
}
- if (destUrl.getProtocol ().compare ("http")
- && destUrl.getProtocol ().compare ("HTTP"))
+ if (stringcmpi (destUrl.getProtocol (), "http"))
{
td->connection->host->warningsLogWrite
("Proxy: %s is not a supported protocol",
commit 260c262bfb03250aa6bc426736888e09a11a060f
Author: Giuseppe Scrivano <address@hidden>
Date: Fri Aug 27 21:38:49 2010 +0200
Use `unsigned long long' to represent off_t.
diff --git a/myserver/src/protocol/ftp/ftp.cpp
b/myserver/src/protocol/ftp/ftp.cpp
index e6b4863..5752de0 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -2531,7 +2531,7 @@ void Ftp::size (const std::string & sPath)
}
char size[12];
- sprintf (size, "%lu", static_cast <size_t> (f.getFileSize ()));
+ sprintf (size, "%llu", static_cast <unsigned long long> (f.getFileSize ()));
f.close ();
ftpReply (213, size);
diff --git a/myserver/src/protocol/http/http_headers.cpp
b/myserver/src/protocol/http/http_headers.cpp
index 890df6d..4b27bff 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -164,14 +164,16 @@ u_long HttpHeaders::buildHTTPRequestHeader (char * str,
if (request->rangeByteBegin < 0)
{
- sprintf (buffer, "%lu", request->rangeByteBegin);
+ sprintf (buffer, "%llu",
+ static_cast<unsigned long long> (request->rangeByteBegin));
pos += myserver_strlcpy (pos, buffer, MAX - (long)(pos - str));
}
pos += myserver_strlcpy (pos, "-", MAX - (long)(pos - str));
if (request->rangeByteEnd < 0)
{
- sprintf (buffer, "%lu", request->rangeByteEnd);
+ sprintf (buffer, "%llu",
+ static_cast<unsigned long long> (request->rangeByteEnd));
pos += myserver_strlcpy (pos, buffer, MAX - (long)(pos - str));
}
pos += myserver_strlcpy (pos, "\r\n", MAX - (long)(pos - str));
-----------------------------------------------------------------------
Summary of changes:
myserver/src/http_handler/proxy/proxy.cpp | 5 +++--
myserver/src/protocol/ftp/ftp.cpp | 2 +-
myserver/src/protocol/http/http.cpp | 4 ++--
myserver/src/protocol/http/http_headers.cpp | 6 ++++--
myserver/src/protocol/http/webdav/webdav.cpp | 2 --
5 files changed, 10 insertions(+), 9 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-381-g5c72956,
Giuseppe Scrivano <=