[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - ucb/source
Fridrich Strba
fridrich at kemper.freedesktop.org
Tue Jun 12 14:49:14 PDT 2012
ucb/source/ucp/webdav/DAVResourceAccess.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit b1d18451a459e0b3d0a715fb93f8104413e804df
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jun 12 18:17:37 2012 +0200
rhbz#678440: Always include User-Agent to avoid 403 from picky servers
(cherry picked from commit 4d0e3127ed2def7212bc05aa860cd06704bb1efe,
with modifications)
Change-Id: I4fa7b45062b0058427f77cf9dc0abebd6b26fb49
Signed-off-by: Fridrich Å trba <fridrich.strba at bluewin.ch>
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
index 11b5251..f62ddaf 100644
--- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
@@ -1151,6 +1151,24 @@ void DAVResourceAccess::getUserRequestHeaders(
}
}
}
+
+ // Make sure a User-Agent header is always included, as at least
+ // en.wikipedia.org:80 forces back 403 "Scripts should use an informative
+ // User-Agent string with contact information, or they may be IP-blocked
+ // without notice" otherwise:
+ for ( DAVRequestHeaders::iterator i(rRequestHeaders.begin());
+ i != rRequestHeaders.end(); ++i )
+ {
+ if ( i->first.equalsIgnoreAsciiCaseAsciiL(
+ RTL_CONSTASCII_STRINGPARAM( "User-Agent" ) ) )
+ {
+ return;
+ }
+ }
+ rRequestHeaders.push_back(
+ DAVRequestHeader(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "User-Agent" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LibreOffice" ) ) ) );
}
//=========================================================================
commit a7a4f705904e638f0196e4fd48075bc005d0d43b
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Tue Jun 12 23:47:54 2012 +0200
Revert "rhbz#678440: Always include User-Agent to avoid 403 from picky servers"
This reverts commit 8dfbb8793407a103ef8c5fa109f0fdf15af9262b.
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
index e669245..11b5251 100644
--- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
@@ -1151,21 +1151,6 @@ void DAVResourceAccess::getUserRequestHeaders(
}
}
}
-
- // Make sure a User-Agent header is always included, as at least
- // en.wikipedia.org:80 forces back 403 "Scripts should use an informative
- // User-Agent string with contact information, or they may be IP-blocked
- // without notice" otherwise:
- for ( DAVRequestHeaders::iterator i(rRequestHeaders.begin());
- i != rRequestHeaders.end(); ++i )
- {
- if ( i->first.equalsIgnoreAsciiCase( "User-Agent" ) )
- {
- return;
- }
- }
- rRequestHeaders.push_back(
- DAVRequestHeader( "User-Agent", "LibreOffice" ) );
}
//=========================================================================
More information about the Libreoffice-commits
mailing list