Fix CIM clients are sometimes getting HTTP/1.1 501 Not Implemented

This commit is contained in:
Vitezslav Crhonek 2013-07-23 14:08:55 +02:00
parent fdfeb6c6ec
commit 99fa5e8fc6
2 changed files with 23 additions and 1 deletions

View File

@ -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;

View File

@ -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@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@redhat.com> - 1.3.16-6
- Perl 5.18 rebuild