diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2004-12-23 08:41:45 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2004-12-23 08:41:45 +0000 |
commit | 384c64629e63674cd937d753b8e232a7e39f5a17 (patch) | |
tree | 4429d171d28df5cf859d98b2b5ead4193272f90f /ucb | |
parent | 7a26caf28ca1d709ae44546a02dc94e0c522afa1 (diff) |
INTEGRATION: CWS kso12 (1.32.26); FILE MERGED
2004/12/01 09:33:55 kso 1.32.26.1: #i37459# - Now supplying "Pragma: no-cache" header with every request in
order to ensure to work always with the most recent data
available on server.
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav/NeonSession.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index dc62f4295805..340df2fbc1f7 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -2,9 +2,9 @@ * * $RCSfile: NeonSession.cxx,v $ * - * $Revision: 1.32 $ + * $Revision: 1.33 $ * - * last change: $Author: rt $ $Date: 2004-09-08 17:05:53 $ + * last change: $Author: vg $ $Date: 2004-12-23 09:41:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -58,7 +58,6 @@ * * ************************************************************************/ - #include <hash_map> #include <string.h> @@ -417,6 +416,12 @@ extern "C" void NeonSession_PreSendRequest( ne_request * req, NeonSession * pSession = static_cast< NeonSession * >( userdata ); if ( pSession ) { + // If there is a proxy server in between, it shall never use + // cached data. We always want 'up-to-date' data. + ne_buffer_concat( headers, "Pragma: no-cache", EOL, NULL ); + // alternative, but understoud by HTTP 1.1 servers only: + // ne_buffer_concat( headers, "Cache-Control: max-age=0", EOL, NULL ); + const RequestDataMap * pRequestData = static_cast< const RequestDataMap* >( pSession->getRequestData() ); @@ -433,7 +438,7 @@ extern "C" void NeonSession_PreSendRequest( ne_request * req, = rtl::OUStringToOString( (*it).second.aContentType, RTL_TEXTENCODING_UTF8 ); ne_buffer_concat( headers, "Content-Type: ", - aType.getStr(), EOL, NULL ); + aType.getStr(), EOL, NULL ); } } @@ -446,7 +451,7 @@ extern "C" void NeonSession_PreSendRequest( ne_request * req, = rtl::OUStringToOString( (*it).second.aReferer, RTL_TEXTENCODING_UTF8 ); ne_buffer_concat( headers, "Referer: ", - aReferer.getStr(), EOL, NULL ); + aReferer.getStr(), EOL, NULL ); } } } |