[sblim-sfcb] Fix CIM clients are sometimes getting HTTP/1.1 501 Not Implemented
vcrhonek
vcrhonek at fedoraproject.org
Tue Jul 23 12:09:08 UTC 2013
commit 99fa5e8fc6ac078110a566aa2dfa4641e3b2892e
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date: Tue Jul 23 14:08:55 2013 +0200
Fix CIM clients are sometimes getting HTTP/1.1 501 Not Implemented
sblim-sfcb-1.3.16-http-header-cmd-check.patch | 14 ++++++++++++++
sblim-sfcb.spec | 10 +++++++++-
2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/sblim-sfcb-1.3.16-http-header-cmd-check.patch b/sblim-sfcb-1.3.16-http-header-cmd-check.patch
new file mode 100644
index 0000000..1254d7b
--- /dev/null
+++ b/sblim-sfcb-1.3.16-http-header-cmd-check.patch
@@ -0,0 +1,14 @@
+diff -up sblim-sfcb-1.3.16/httpAdapter.c.bak sblim-sfcb-1.3.16/httpAdapter.c
+--- sblim-sfcb-1.3.16/httpAdapter.c.bak 2012-10-06 03:19:15.000000000 +0200
++++ sblim-sfcb-1.3.16/httpAdapter.c 2013-05-29 19:57:16.906813502 +0200
+@@ -728,8 +728,8 @@ static int getHdrs(CommHndl conn_fd, Buf
+ total+=r;
+
+ /* on first run through, ensure that this is a POST req. */
+- if (r && first) {
+- if (strncasecmp(buf,cmd,strlen(cmd)) != 0) {
++ if (first && total >= strlen(cmd)) {
++ if (strncasecmp(b->data,cmd,strlen(cmd)) != 0) {
+ /* not what we expected - still continue to read to
+ not confuse the client */
+ state = 1;
diff --git a/sblim-sfcb.spec b/sblim-sfcb.spec
index ff59a03..7ab685b 100644
--- a/sblim-sfcb.spec
+++ b/sblim-sfcb.spec
@@ -8,7 +8,7 @@ Name: sblim-sfcb
Summary: Small Footprint CIM Broker
URL: http://sblim.wiki.sourceforge.net/
Version: 1.3.16
-Release: 6%{?dist}
+Release: 7%{?dist}
Group: Applications/System
License: EPL
Source0: http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2
@@ -38,6 +38,8 @@ Patch8: sblim-sfcb-1.3.16-escape.patch
Patch9: sblim-sfcb-1.3.16-embedded-instance.patch
# Patch10: increase default value of maxMsgLen in sfcb.cfg
Patch10: sblim-sfcb-1.3.16-maxMsgLen.patch
+# Patch11: fix CIM clients are sometimes getting HTTP/1.1 501 Not Implemented
+Patch11: sblim-sfcb-1.3.16-http-header-cmd-check.patch
Provides: cim-server
Requires: cim-schema
BuildRequires: libcurl-devel
@@ -72,6 +74,7 @@ Programming Interface (CMPI).
%patch8 -p1 -b .escape
%patch9 -p1 -b .embedded-instance
%patch10 -p1 -b .maxMsgLen
+%patch11 -p1 -b .http-header-cmd-check
%build
%configure --enable-debug --enable-uds --enable-ssl --enable-pam --enable-ipv6 CFLAGS="$CFLAGS -D_GNU_SOURCE -fPIE -DPIE" LDFLAGS="$LDFLAGS -Wl,-z,now -pie"
@@ -129,6 +132,11 @@ fi;
%files -f _pkg_list
%changelog
+* Tue Jul 23 2013 Vitezslav Crhonek <vcrhonek at redhat.com> - 1.3.16-7
+- Fix CIM clients are sometimes getting HTTP/1.1 501 Not Implemented
+ (patch by Tomas Bzatek)
+ Resolves: #968397
+
* Wed Jul 17 2013 Petr Pisar <ppisar at redhat.com> - 1.3.16-6
- Perl 5.18 rebuild
More information about the scm-commits
mailing list