Skip to content

Commit

Permalink
Merge pull request #1 from fmidev/hotfix/server-remove-load-testing-h…
Browse files Browse the repository at this point in the history
…eaders

Removed expiration headers used during load testing.
  • Loading branch information
mheiskan committed Dec 19, 2016
2 parents 5a6b4f9 + f63963d commit 0715613
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
11 changes: 7 additions & 4 deletions smartmet-server.spec
Expand Up @@ -2,14 +2,14 @@
%define SPECNAME smartmet-%{DIRNAME}
Summary: SmartMet HTTP server
Name: %{SPECNAME}
Version: 16.11.30
Version: 16.12.19
Release: 1%{?dist}.fmi
License: FMI
Group: SmartMet/Daemons
URL: http://www.weatherproof.fi
Source0: smartmet-server.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: smartmet-library-spine-devel >= 16.11.29
BuildRequires: smartmet-library-spine-devel >= 16.11.30
BuildRequires: boost-devel
%if 0%{rhel} >= 7
Requires: boost-filesystem
Expand All @@ -24,7 +24,7 @@ BuildRequires: libconfig-devel
BuildRequires: libconfig
BuildRequires: libsmartmet-macgyver-devel >= 16.9.30
BuildRequires: jemalloc-devel
Requires: smartmet-library-spine >= 16.11.29
Requires: smartmet-library-spine >= 16.11.30
Requires: libsmartmet-macgyver >= 16.9.30
Requires: glibc
Requires: libconfig
Expand Down Expand Up @@ -63,7 +63,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(0755,root,root,0755)
%{_sbindir}/smartmetd
%defattr(0644,root,root,0755)
%congig{noreplace} /usr/lib/systemd/system/smartmet-server.service
%config(noreplace) /usr/lib/systemd/system/smartmet-server.service
%config(noreplace) %{_sysconfdir}/logrotate.d/smartmet-server


Expand All @@ -84,6 +84,9 @@ fi


%changelog
* Mon Dec 19 2016 Mika Heiskanen <mika.heiskanen@fmi.fi> - 16.12.19-1.fmi
- Removed cache expiration headers added for load testing purposes

* Wed Nov 30 2016 Mika Heiskanen <mika.heiskanen@fmi.fi> - 16.11.30-1.fmi
- Removed installation of smartmet.conf

Expand Down
10 changes: 1 addition & 9 deletions source/AsyncConnection.cpp
Expand Up @@ -60,10 +60,7 @@ AsyncConnection::~AsyncConnection()
}
}

boost::asio::ip::tcp::socket& AsyncConnection::socket()
{
return itsSocket;
}
boost::asio::ip::tcp::socket& AsyncConnection::socket() { return itsSocket; }
void AsyncConnection::handleTimer(const boost::system::error_code& err)
{
try
Expand Down Expand Up @@ -839,11 +836,6 @@ void AsyncConnection::setServerHeaders()

itsResponse->setHeader("Date", makeDateString());

// Removal of cache headers for testing purposes!
itsResponse->setHeader("Cache-Control", "no-cache, no-store, must-revalidate");

itsResponse->setHeader("Expires", "Thu, 01 Jan 1970 00:00:00 GMT");

if (itsResponse->getVersion() == "1.1")
{
itsResponse->setHeader("Connection",
Expand Down

0 comments on commit 0715613

Please sign in to comment.