[libcmis] 06/40: Imported Upstream version 0.2.3

Rene Engelhard rene at moszumanska.debian.org
Tue Sep 13 02:52:01 UTC 2016


This is an automated email from the git hooks/post-receive script.

rene pushed a commit to branch master
in repository libcmis.

commit 0124025ea956b519fd711dbc87b1195f459355e2
Author: Rene Engelhard <rene at rene-engelhard.de>
Date:   Sat Apr 23 11:37:36 2016 +0200

    Imported Upstream version 0.2.3
---
 ChangeLog                     |  71 +++++++
 Makefile.am                   |  22 +-
 Makefile.in                   | 107 ++++++++--
 NEWS                          |  10 +
 configure                     | 148 +++++++++++---
 configure.ac                  |  34 +++-
 doc/Makefile.am               |   4 -
 doc/Makefile.in               | 461 ------------------------------------------
 doc/cmis-client.1             | 207 -------------------
 libcmis.pc.in                 |   1 +
 src/libcmis/Makefile.am       |   2 +-
 src/libcmis/Makefile.in       |   2 +-
 src/libcmis/atom-document.cxx |  73 +++++--
 src/libcmis/atom-object.cxx   |   7 +-
 src/libcmis/atom-session.cxx  |  69 ++++---
 src/libcmis/atom-session.hxx  |   8 +-
 src/libcmis/atom-utils.cxx    |   3 +-
 17 files changed, 453 insertions(+), 776 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2be1661..4e22093 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,76 @@
 # Generated by Makefile. Do not edit.
 
+commit a094da426f554c97883257d2bfaa9da56c931c94
+Author: Cédric Bosdonnat <cbosdo at users.sourceforge.net>
+Date:   Fri Jun 8 12:44:59 2012 +0200
+
+    setContentStream: SharePoint wants base64 encoded content
+    
+    In order to satisfy SharePoint and not break the others, first try to
+    send raw data, and send base64 encoded data only if we got a 400 error.
+    
+    SharePoint also sends a 302 with a Location pointing to an error page
+    when setting content on a non-checkout document: handled all non 2xx
+    statuses as errors.
+
+commit c60fcaf3057f66fda2dfcad8cef9ffc61c80e613
+Author: Cédric Bosdonnat <cbosdo at users.sourceforge.net>
+Date:   Thu Jun 7 11:53:41 2012 +0200
+
+    setContentStream: url-encode request params as changeToken is an obscure string
+
+commit 8e783df60c3cbd75fe5031c235c4346b94888331
+Author: Cédric Bosdonnat <cbosdo at users.sourceforge.net>
+Date:   Thu Jun 7 11:26:41 2012 +0200
+
+    SharePoint: some links have no type, fixed how these are handled
+
+commit 6bd45f4cf07a3ed93011c4d8eb0c2fb4e9b82167
+Author: Cédric Bosdonnat <cbosdo at users.sourceforge.net>
+Date:   Wed Jun 6 18:09:06 2012 +0200
+
+    SharePoint repository id is case insensitive
+    
+    It may not be the best thing to do to always check lowercased strings as
+    IDs are obscure strings
+
+commit 55c600f268605364797894b7cbc2e7393bdd85f8
+Author: Tomas Chvatal <tchvatal at suse.cz>
+Date:   Wed Jun 6 11:08:07 2012 +0200
+
+    Add libs/includes that are required when we try to build against cmis and use pc file.
+
+commit 0ce143261cba7c567fc9b47386a09e507cd294c6
+Author: Tomas Chvatal <tchvatal at suse.cz>
+Date:   Wed Jun 6 11:03:29 2012 +0200
+
+    Create the manpage conditionaly, and also install it when needed.
+    
+    Signed-off-by: Tomas Chvatal <tchvatal at suse.cz>
+
+commit c22694d275e77248ed423a2fcde885accd957ce2
+Author: Cédric Bosdonnat <cbosdo at users.sourceforge.net>
+Date:   Tue Jun 5 17:24:12 2012 +0200
+
+    base64 encoder: fixed signed values encoding
+    
+    The problem is typical the following. Encoding 0x3F 0xEB 0xEF, the
+    values for 0xEB and 0xEF were used as negative values. Casting to
+    an unsigned char will give us the proper 0xEB and 0xEF values to be
+    used in the base64 encoding algorithm.
+
+commit b55798d95a7133bed2a5b5acc2368bf8887877d3
+Author: Cédric Bosdonnat <cbosdo at users.sourceforge.net>
+Date:   Mon Jun 4 20:39:39 2012 +0200
+
+    libcurl version test was wrong...
+
+commit 325ec69a14dc8e11ddddb6dca69832f3c28f600c
+Author: Cédric Bosdonnat <cbosdo at users.sourceforge.net>
+Date:   Mon Jun 4 18:48:54 2012 +0200
+
+    Fixed soname to fit library version
+
 commit 3ffaa303a18a9a87d25ada35eb0f704dae43a3e8
 Author: Cédric Bosdonnat <cbosdo at users.sourceforge.net>
 Date:   Mon Jun 4 18:41:50 2012 +0200
diff --git a/Makefile.am b/Makefile.am
index 36f6f83..27520e0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = src doc
+SUBDIRS = src
 ACLOCAL_AMFLAGS = -I m4
 
 pcfiles = libcmis- at LIBCMIS_API_VERSION@.pc
@@ -8,12 +8,26 @@ libcmis- at LIBCMIS_API_VERSION@.pc: libcmis.pc
 pkgconfig_DATA = $(pcfiles)
 pkgconfigdir = $(libdir)/pkgconfig
 
+if WITH_LIBCMIS_MAN
+cmis-client.1: doc/cmis-client.xml
+	$(DOCBOOK2X) $<
+
+install-data-am: cmis-client.1
+	mkdir -p $(DESTDIR)$(mandir)/man1/
+	$(INSTALL_DATA) cmis-client.1 $(DESTDIR)$(mandir)/man1/
+
+uninstall-am:
+	-rm -rf $(DESTDIR)$(mandir)/man1/
+endif
+
+dist_man_MANS = doc/cmis-client.xml
+
 EXTRA_DIST = \
 	libcmis.pc.in \
 	run-test.sh \
-    COPYING.MPL \
-    COPYING.GPL \
-    COPYING.LGPL \
+	COPYING.MPL \
+	COPYING.GPL \
+	COPYING.LGPL \
 	src/libcmis/makefile.mk \
 	doc/cmis-client.xml
 
diff --git a/Makefile.in b/Makefile.in
index dd4aa88..e6c5fc8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -35,10 +35,11 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(srcdir)/libcmis.pc.in \
-	$(top_srcdir)/configure AUTHORS ChangeLog NEWS config.guess \
-	config.sub depcomp install-sh ltmain.sh missing
+DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/libcmis.pc.in $(top_srcdir)/configure AUTHORS \
+	ChangeLog NEWS config.guess config.sub depcomp install-sh \
+	ltmain.sh missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/boost.m4 \
 	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -81,7 +82,10 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
+manxdir = $(mandir)/manx
+am__installdirs = "$(DESTDIR)$(manxdir)" "$(DESTDIR)$(pkgconfigdir)"
+NROFF = nroff
+MANS = $(dist_man_MANS)
 DATA = $(pkgconfig_DATA)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
@@ -264,17 +268,18 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-SUBDIRS = src doc
+SUBDIRS = src
 ACLOCAL_AMFLAGS = -I m4
 pcfiles = libcmis- at LIBCMIS_API_VERSION@.pc
 pkgconfig_DATA = $(pcfiles)
 pkgconfigdir = $(libdir)/pkgconfig
+dist_man_MANS = doc/cmis-client.xml
 EXTRA_DIST = \
 	libcmis.pc.in \
 	run-test.sh \
-    COPYING.MPL \
-    COPYING.GPL \
-    COPYING.LGPL \
+	COPYING.MPL \
+	COPYING.GPL \
+	COPYING.LGPL \
 	src/libcmis/makefile.mk \
 	doc/cmis-client.xml
 
@@ -326,6 +331,44 @@ clean-libtool:
 
 distclean-libtool:
 	-rm -f libtool config.lt
+install-manx: $(dist_man_MANS)
+	@$(NORMAL_INSTALL)
+	test -z "$(manxdir)" || $(MKDIR_P) "$(DESTDIR)$(manxdir)"
+	@list=''; test -n "$(manxdir)" || exit 0; \
+	{ for i in $$list; do echo "$$i"; done; \
+	l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.x[a-z]*$$/p'; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^x][0-9a-z]*$$,x,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(manxdir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(manxdir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(manxdir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(manxdir)" || exit $$?; }; \
+	done; }
+
+uninstall-manx:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(manxdir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.x[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^x][0-9a-z]*$$,x,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	test -z "$$files" || { \
+	  echo " ( cd '$(DESTDIR)$(manxdir)' && rm -f" $$files ")"; \
+	  cd "$(DESTDIR)$(manxdir)" && rm -f $$files; }
 install-pkgconfigDATA: $(pkgconfig_DATA)
 	@$(NORMAL_INSTALL)
 	test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@@ -483,6 +526,19 @@ distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
 	$(am__remove_distdir)
 	test -d "$(distdir)" || mkdir "$(distdir)"
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -662,10 +718,10 @@ distcleancheck: distclean
 	       exit 1; } >&2
 check-am: all-am
 check: check-recursive
-all-am: Makefile $(DATA)
+all-am: Makefile $(MANS) $(DATA)
 installdirs: installdirs-recursive
 installdirs-am:
-	for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
+	for dir in "$(DESTDIR)$(manxdir)" "$(DESTDIR)$(pkgconfigdir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-recursive
@@ -715,7 +771,8 @@ info: info-recursive
 
 info-am:
 
-install-data-am: install-pkgconfigDATA
+ at WITH_LIBCMIS_MAN_FALSE@install-data-am: install-man \
+ at WITH_LIBCMIS_MAN_FALSE@	install-pkgconfigDATA
 
 install-dvi: install-dvi-recursive
 
@@ -731,7 +788,7 @@ install-info: install-info-recursive
 
 install-info-am:
 
-install-man:
+install-man: install-manx
 
 install-pdf: install-pdf-recursive
 
@@ -761,7 +818,10 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-pkgconfigDATA
+ at WITH_LIBCMIS_MAN_FALSE@uninstall-am: uninstall-man \
+ at WITH_LIBCMIS_MAN_FALSE@	uninstall-pkgconfigDATA
+
+uninstall-man: uninstall-manx
 
 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
 	install-am install-strip tags-recursive
@@ -776,16 +836,27 @@ uninstall-am: uninstall-pkgconfigDATA
 	install install-am install-data install-data-am install-dvi \
 	install-dvi-am install-exec install-exec-am install-html \
 	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-pkgconfigDATA install-ps \
-	install-ps-am install-strip installcheck installcheck-am \
-	installdirs installdirs-am maintainer-clean \
+	install-manx install-pdf install-pdf-am install-pkgconfigDATA \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-generic \
 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am uninstall-pkgconfigDATA
+	uninstall uninstall-am uninstall-man uninstall-manx \
+	uninstall-pkgconfigDATA
 
 libcmis- at LIBCMIS_API_VERSION@.pc: libcmis.pc
 		@cp -f $< $@
 
+ at WITH_LIBCMIS_MAN_TRUE@cmis-client.1: doc/cmis-client.xml
+ at WITH_LIBCMIS_MAN_TRUE@	$(DOCBOOK2X) $<
+
+ at WITH_LIBCMIS_MAN_TRUE@install-data-am: cmis-client.1
+ at WITH_LIBCMIS_MAN_TRUE@	mkdir -p $(DESTDIR)$(mandir)/man1/
+ at WITH_LIBCMIS_MAN_TRUE@	$(INSTALL_DATA) cmis-client.1 $(DESTDIR)$(mandir)/man1/
+
+ at WITH_LIBCMIS_MAN_TRUE@uninstall-am:
+ at WITH_LIBCMIS_MAN_TRUE@	-rm -rf $(DESTDIR)$(mandir)/man1/
+
 dist-hook:
 	@if test -d "$(srcdir)/.git"; \
 	then \
diff --git a/NEWS b/NEWS
index 7d6e5a1..114fd81 100644
--- a/NEWS
+++ b/NEWS
@@ -29,3 +29,13 @@
 0.2.1
 
   * Fixed documentation distribution
+
+0.2.2
+
+  * Fixed soname for the library
+  * Allow building against libcurl 7.13.1
+
+0.2.3
+
+  * Fixed SharePoint support
+  * Conditional build of man page
diff --git a/configure b/configure
index f293819..863d352 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for libcmis 0.2.2.
+# Generated by GNU Autoconf 2.68 for libcmis 0.2.3.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='libcmis'
 PACKAGE_TARNAME='libcmis'
-PACKAGE_VERSION='0.2.2'
-PACKAGE_STRING='libcmis 0.2.2'
+PACKAGE_VERSION='0.2.3'
+PACKAGE_STRING='libcmis 0.2.3'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -628,6 +628,8 @@ CURL_CFLAGS
 PKG_CONFIG_LIBDIR
 PKG_CONFIG_PATH
 PKG_CONFIG
+WITH_LIBCMIS_MAN_FALSE
+WITH_LIBCMIS_MAN_TRUE
 DOCBOOK2X
 AS
 CXXCPP
@@ -762,6 +764,7 @@ enable_fast_install
 with_gnu_ld
 with_sysroot
 enable_libtool_lock
+with_man
 enable_werror
 with_boost
 enable_static_boost
@@ -1331,7 +1334,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libcmis 0.2.2 to adapt to many kinds of systems.
+\`configure' configures libcmis 0.2.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1401,7 +1404,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libcmis 0.2.2:";;
+     short | recursive ) echo "Configuration of libcmis 0.2.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1431,6 +1434,7 @@ Optional Packages:
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-sysroot=DIR Search for dependent libraries within DIR
                         (or the compiler's sysroot if not specified).
+  --without-man           Do not build manpage
   --with-boost=DIR        prefix of Boost [guess]
 
 Some influential environment variables:
@@ -1526,7 +1530,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libcmis configure 0.2.2
+libcmis configure 0.2.3
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2153,7 +2157,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libcmis $as_me 0.2.2, which was
+It was created by libcmis $as_me 0.2.3, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -2968,7 +2972,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='libcmis'
- VERSION='0.2.2'
+ VERSION='0.2.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -15476,24 +15480,41 @@ test -z "$OBJDUMP" && OBJDUMP=objdump
 
 
 # TODO Check for docbook-to-man
-# Extract the first word of "docbook-to-man", so it can be a program name with args.
+# =============
+# Documentation
+# =============
+
+# Check whether --with-man was given.
+if test "${with_man+set}" = set; then :
+  withval=$with_man; with_man="$withval"
+else
+  with_man=yes
+
+fi
+
+if test "x$with_man" != "xno"; then :
+
+	build_man=yes
+	# Extract the first word of "docbook-to-man", so it can be a program name with args.
 set dummy docbook-to-man; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DOCBOOK2X+:} false; then :
+if ${ac_cv_path_DOCBOOK2X+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$DOCBOOK2X"; then
-  ac_cv_prog_DOCBOOK2X="$DOCBOOK2X" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $DOCBOOK2X in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DOCBOOK2X="$DOCBOOK2X" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_DOCBOOK2X="docbook2X"
+    ac_cv_path_DOCBOOK2X="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -15501,9 +15522,52 @@ done
   done
 IFS=$as_save_IFS
 
+  ;;
+esac
+fi
+DOCBOOK2X=$ac_cv_path_DOCBOOK2X
+if test -n "$DOCBOOK2X"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOK2X" >&5
+$as_echo "$DOCBOOK2X" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
+
+
+	if test -z "$DOCBOOK2X"; then :
+
+		# Extract the first word of "docbook2man.pl", so it can be a program name with args.
+set dummy docbook2man.pl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_DOCBOOK2X+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $DOCBOOK2X in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DOCBOOK2X="$DOCBOOK2X" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_DOCBOOK2X="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
 fi
-DOCBOOK2X=$ac_cv_prog_DOCBOOK2X
+DOCBOOK2X=$ac_cv_path_DOCBOOK2X
 if test -n "$DOCBOOK2X"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOK2X" >&5
 $as_echo "$DOCBOOK2X" >&6; }
@@ -15513,10 +15577,27 @@ $as_echo "no" >&6; }
 fi
 
 
-if test "x$DOCBOOK2X" = "x"; then
-    as_fn_error $? "docbook-to-man is missing. Install docbook2X package." "$LINENO" 5
+		if test -z "$DOCBOOK2X"; then :
+
+			as_fn_error $? "docbook-to-man is missing. Install docbook2X package." "$LINENO" 5
+
 fi
 
+fi
+
+else
+  build_man=no
+fi
+
+ if test "x$build_man" != "xno"; then
+  WITH_LIBCMIS_MAN_TRUE=
+  WITH_LIBCMIS_MAN_FALSE='#'
+else
+  WITH_LIBCMIS_MAN_TRUE='#'
+  WITH_LIBCMIS_MAN_FALSE=
+fi
+
+
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror; enable_werror="$enableval"
@@ -15669,16 +15750,16 @@ if test -n "$CURL_CFLAGS"; then
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
-	libcurl
+	 libcurl >= 7.12.3
 \""; } >&5
   ($PKG_CONFIG --exists --print-errors "
-	libcurl
+	 libcurl >= 7.12.3
 ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_CURL_CFLAGS=`$PKG_CONFIG --cflags "
-	libcurl
+	 libcurl >= 7.12.3
 " 2>/dev/null`
 else
   pkg_failed=yes
@@ -15691,16 +15772,16 @@ if test -n "$CURL_LIBS"; then
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
-	libcurl
+	 libcurl >= 7.12.3
 \""; } >&5
   ($PKG_CONFIG --exists --print-errors "
-	libcurl
+	 libcurl >= 7.12.3
 ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_CURL_LIBS=`$PKG_CONFIG --libs "
-	libcurl
+	 libcurl >= 7.12.3
 " 2>/dev/null`
 else
   pkg_failed=yes
@@ -15722,18 +15803,18 @@ else
 fi
         if test $_pkg_short_errors_supported = yes; then
 	        CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "
-	libcurl
+	 libcurl >= 7.12.3
 " 2>&1`
         else
 	        CURL_PKG_ERRORS=`$PKG_CONFIG --print-errors "
-	libcurl
+	 libcurl >= 7.12.3
 " 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$CURL_PKG_ERRORS" >&5
 
 	as_fn_error $? "Package requirements (
-	libcurl
+	 libcurl >= 7.12.3
 ) were not met:
 
 $CURL_PKG_ERRORS
@@ -16965,7 +17046,7 @@ fi
 
 # Checks for library functions.
 
-ac_config_files="$ac_config_files Makefile libcmis.pc src/Makefile src/libcmis/Makefile doc/Makefile"
+ac_config_files="$ac_config_files Makefile libcmis.pc src/Makefile src/libcmis/Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -17140,6 +17221,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${WITH_LIBCMIS_MAN_TRUE}" && test -z "${WITH_LIBCMIS_MAN_FALSE}"; then
+  as_fn_error $? "conditional \"WITH_LIBCMIS_MAN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 : "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
@@ -17549,7 +17634,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libcmis $as_me 0.2.2, which was
+This file was extended by libcmis $as_me 0.2.3, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17606,7 +17691,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libcmis config.status 0.2.2
+libcmis config.status 0.2.3
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
@@ -18109,7 +18194,6 @@ do
     "libcmis.pc") CONFIG_FILES="$CONFIG_FILES libcmis.pc" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
     "src/libcmis/Makefile") CONFIG_FILES="$CONFIG_FILES src/libcmis/Makefile" ;;
-    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
@@ -19486,6 +19570,7 @@ libcmis $VERSION:
               client: ${enable_client}
               werror: ${enable_werror}
                tests: ${enable_tests}
+                mans: ${build_man}
 " >&5
 $as_echo "$as_me:
 
@@ -19495,4 +19580,5 @@ libcmis $VERSION:
               client: ${enable_client}
               werror: ${enable_werror}
                tests: ${enable_tests}
+                mans: ${build_man}
 " >&6;}
diff --git a/configure.ac b/configure.ac
index 343f926..6066aad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 m4_define([libcmis_major_version], [0])
 m4_define([libcmis_minor_version], [2])
-m4_define([libcmis_micro_version], [2])
+m4_define([libcmis_micro_version], [3])
 m4_define([libcmis_api_version], [libcmis_major_version.libcmis_minor_version])
 m4_define([libcmis_version],[libcmis_api_version.libcmis_micro_version])
 
@@ -45,10 +45,26 @@ AC_PROG_LIBTOOL
 AC_LIBTOOL_WIN32_DLL
 
 # TODO Check for docbook-to-man
-AC_CHECK_PROG(DOCBOOK2X,[docbook-to-man],[docbook2X])
-if test "x$DOCBOOK2X" = "x"; then
-    AC_MSG_ERROR([docbook-to-man is missing. Install docbook2X package.])
-fi
+# =============
+# Documentation
+# =============
+AC_ARG_WITH(man,
+	[AS_HELP_STRING([--without-man], [Do not build manpage])],
+	[with_man="$withval"],
+	[with_man=yes]
+)
+AS_IF([test "x$with_man" != "xno"], [
+	build_man=yes
+	AC_PATH_PROG(DOCBOOK2X,[docbook-to-man])
+	AS_IF([test -z "$DOCBOOK2X"], [
+		AC_PATH_PROG(DOCBOOK2X,[docbook2man.pl])
+		AS_IF([test -z "$DOCBOOK2X"], [
+			AC_MSG_ERROR([docbook-to-man is missing. Install docbook2X package.])
+		])
+	])
+], [build_man=no])
+AC_SUBST(DOCBOOK2X)
+AM_CONDITIONAL([WITH_LIBCMIS_MAN], [test "x$build_man" != "xno"])
 
 AC_ARG_ENABLE([werror],
 	[AS_HELP_STRING([--disable-werror], [Treat all warnings as errors, usefull for development])],
@@ -67,7 +83,7 @@ AS_IF([test x"$GCC" = xyes], [
 
 # Check for curl
 PKG_CHECK_MODULES(CURL,[
-	libcurl
+	[ libcurl >= 7.12.3 ]
 ])
 AC_SUBST(CURL_CFLAGS)
 AC_SUBST(CURL_LIBS)
@@ -108,11 +124,12 @@ AC_TYPE_SIZE_T
 
 # Checks for library functions.
 
-AC_CONFIG_FILES([Makefile
+AC_CONFIG_FILES([
+	Makefile
 	libcmis.pc
 	src/Makefile
 	src/libcmis/Makefile
-	doc/Makefile])
+])
 AC_OUTPUT
 
 AC_MSG_NOTICE([
@@ -123,4 +140,5 @@ libcmis $VERSION:
               client: ${enable_client}
               werror: ${enable_werror}
                tests: ${enable_tests}
+                mans: ${build_man}
 ])
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644
index f311cca..0000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-cmis-client.1: cmis-client.xml
-	docbook-to-man $<
-
-dist_man_MANS = cmis-client.1
diff --git a/doc/Makefile.in b/doc/Makefile.in
deleted file mode 100644
index 35ea708..0000000
--- a/doc/Makefile.in
+++ /dev/null
@@ -1,461 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = doc
-DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/boost.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-man1dir = $(mandir)/man1
-am__installdirs = "$(DESTDIR)$(man1dir)"
-NROFF = nroff
-MANS = $(dist_man_MANS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
-BOOST_DATE_TIME_LDFLAGS = @BOOST_DATE_TIME_LDFLAGS@
-BOOST_DATE_TIME_LIBS = @BOOST_DATE_TIME_LIBS@
-BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@
-BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
-BOOST_ROOT = @BOOST_ROOT@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
-CPPUNIT_LIBS = @CPPUNIT_LIBS@
-CURL_CFLAGS = @CURL_CFLAGS@
-CURL_LIBS = @CURL_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
-DLLTOOL = @DLLTOOL@
-DOCBOOK2X = @DOCBOOK2X@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCMIS_API_VERSION = @LIBCMIS_API_VERSION@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-XML2_CFLAGS = @XML2_CFLAGS@
-XML2_LIBS = @XML2_LIBS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-dist_man_MANS = cmis-client.1
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign doc/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-install-man1: $(dist_man_MANS)
-	@$(NORMAL_INSTALL)
-	test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
-	@list=''; test -n "$(man1dir)" || exit 0; \
-	{ for i in $$list; do echo "$$i"; done; \
-	l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
-	  sed -n '/\.1[a-z]*$$/p'; \
-	} | while read p; do \
-	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; echo "$$p"; \
-	done | \
-	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
-	sed 'N;N;s,\n, ,g' | { \
-	list=; while read file base inst; do \
-	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
-	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
-	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
-	  fi; \
-	done; \
-	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
-	while read files; do \
-	  test -z "$$files" || { \
-	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
-	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
-	done; }
-
-uninstall-man1:
-	@$(NORMAL_UNINSTALL)
-	@list=''; test -n "$(man1dir)" || exit 0; \
-	files=`{ for i in $$list; do echo "$$i"; done; \
-	l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
-	  sed -n '/\.1[a-z]*$$/p'; \
-	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
-	test -z "$$files" || { \
-	  echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
-	  cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
-	@list='$(MANS)'; if test -n "$$list"; then \
-	  list=`for p in $$list; do \
-	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
-	  if test -n "$$list" && \
-	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
-	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
-	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
-	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
-	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
-	    exit 1; \
-	  else :; fi; \
-	else :; fi
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(MANS)
-installdirs:
-	for dir in "$(DESTDIR)$(man1dir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-man
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man: install-man1
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-man
-
-uninstall-man: uninstall-man1
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-man1 \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-man uninstall-man1
-
-cmis-client.1: cmis-client.xml
-	docbook-to-man $<
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/doc/cmis-client.1 b/doc/cmis-client.1
deleted file mode 100644
index 139dbac..0000000
--- a/doc/cmis-client.1
+++ /dev/null
@@ -1,207 +0,0 @@
-.\" -*- coding: us-ascii -*-
-.if \n(.g .ds T< \\FC
-.if \n(.g .ds T> \\F[\n[.fam]]
-.de URL
-\\$2 \(la\\$1\(ra\\$3
-..
-.if \n(.g .mso www.tmac
-.TH cmis-client 1 2012-02-21 "cmis-client 0.2.0" ""
-.SH NAME
-cmis-client
-\- command line CMIS client tool. 
-.SH SYNOPSIS
-'nh
-.fi
-.ad l
-\fBcmis-client\fR \kx
-.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
-'in \n(.iu+\nxu
-help 
-'in \n(.iu-\nxu
-.ad b
-'hy
-'nh
-.fi
-.ad l
-\fBcmis-client\fR \kx
-.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
-'in \n(.iu+\nxu
-[-v] --url \fIurl://to/binding\fR list-repos 
-'in \n(.iu-\nxu
-.ad b
-'hy
-'nh
-.fi
-.ad l
-\fBcmis-client\fR \kx
-.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
-'in \n(.iu+\nxu
-[-v] [-u \fIlogin\fR] [-p \fIsecret\fR] --url \fIurl://to/binding\fR -r \fIrepo-id\fR show-root 
-'in \n(.iu-\nxu
-.ad b
-'hy
-'nh
-.fi
-.ad l
-\fBcmis-client\fR \kx
-.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
-'in \n(.iu+\nxu
-[-v] [-u \fIlogin\fR] [-p \fIsecret\fR] --url \fIurl://to/binding\fR -r \fIrepo-id\fR get-content \fIid\fR 
-'in \n(.iu-\nxu
-.ad b
-'hy
-'nh
-.fi
-.ad l
-\fBcmis-client\fR \kx
-.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
-'in \n(.iu+\nxu
-[-v] [-u \fIlogin\fR] [-p \fIsecret\fR] --url \fIurl://to/binding\fR -r \fIrepo-id\fR --input-file \fIpath/to/file\fR --input-type \fImime/type\fR set-content \fIid\fR 
-'in \n(.iu-\nxu
-.ad b
-'hy
-'nh
-.fi
-.ad l
-\fBcmis-client\fR \kx
-.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
-'in \n(.iu+\nxu
-[-v] [-u \fIlogin\fR] [-p \fIsecret\fR] --url \fIurl://to/binding\fR -r \fIrepo-id\fR [--object-type \fIsome:cmistype\fR] [--object-property \fIprop-id=prop-value\fR]\&... create-folder \fIparent-id name\fR 
-'in \n(.iu-\nxu
-.ad b
-'hy
-'nh
-.fi
-.ad l
-\fBcmis-client\fR \kx
-.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
-'in \n(.iu+\nxu
-[-v] [-u \fIlogin\fR] [-p \fIsecret\fR] --url \fIurl://to/binding\fR -r \fIrepo-id\fR --input-file \fIpath/to/file\fR --input-type \fImime/type\fR [--object-type \fIsome:cmistype\fR] [--object-property \fIprop-id=prop-value\fR]\&... create-document \fIparent-id name\fR 
-'in \n(.iu-\nxu
-.ad b
-'hy
-'nh
-.fi
-.ad l
-\fBcmis-client\fR \kx
-.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
-'in \n(.iu+\nxu
-[-v] [-u \fIlogin\fR] [-p \fIsecret\fR] --url \fIurl://to/binding\fR -r \fIrepo-id\fR [--object-property \fIprop-id=prop-value\fR]\&... update-object \fIobject-id\fR 
-'in \n(.iu-\nxu
-.ad b
-'hy
-'nh
-.fi
-.ad l
-\fBcmis-client\fR \kx
-.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
-'in \n(.iu+\nxu
-[-v] [-u \fIlogin\fR] [-p \fIsecret\fR] --url \fIurl://to/binding\fR -r \fIrepo-id\fR type-by-id | show-by-id | show-by-path | delete 
-\fIarg\fR
-\&...
-'in \n(.iu-\nxu
-.ad b
-'hy
-.SH DESCRIPTION
-The \fBcmis-client\fR tool sends queries over the net to a CMIS-enabled server
-to access or modify its content. It is originally demonstrating what libcmis is capable of.
-.SH OPTIONS
-.SS "GLOBAL OPTIONS"
-.TP 
--v, --verbose
-Shows a lot of information to monitor what is happening behind the scene.
-This helps a lot to debug libcmis.
-.TP 
---help
-Show the help and exit. This is equivalent to use the help command.
-.TP 
---url \fIurl://to/binding\fR
-\fIrepo-id\fR needs to point to the AtomPub service document.
-Note that only AtomPub binding is currently supported by libcmis.
-.TP 
--r,--repository \fIrepo-id\fR
-Operate on the \fIrepo-id\fR CMIS repository.
-.TP 
--u,--username \fIlogin\fR
-Connect as \fIlogin\fR to the CMIS server.
-If not provided connect anonymously.
-.TP 
--p,--password \fIsecret\fR
-Use \fIsecret\fR to authenticate on the CMIS server.
-.SS "MODIFICATION OPERATIONS OPTIONS"
-.TP 
---input-file \fIpath/to/file\fR
-Upload \fIpath/to/file\fR as the new content stream
-of the object.
-.TP 
---input-type \fImime/type\fR
-Set the mime type of the new content stream of the object to \fImime/type\fR.
-.TP 
---object-type \fIsome:cmistype\fR
-Set the object type of the CMIS object to be created to \fIsome:cmistype\fR.
-This is the equivalent of --object-property cmis:objectTypeId=some:cmistype.
-.TP 
---object-property \fIprop-id=prop-value\fR
-Set a property to be updated or added to the CMIS object. \fIprop-id\fR is
-the property definition id and \fIprop-value\fR is the value to set on it.
-.SS COMMANDS
-.TP 
-help
-Show the help and exit.
-.TP 
-list-repos
-List the repositories available on the server.
-.TP 
-show-root
-Displays the root node infos and children.
-.TP 
-get-content \fIid\fR
-Download the content of the CMIS object corresponding to 
-\fIid\fR in the current directory.
-.TP 
-set-content \fIid\fR
-Upload a file as the content stream of the CMIS object corresponding to 
-\fIid\fR.
-.TP 
-create-folder \fIparent-id name\fR
-Create a sub folder in folder \fIparent-id\fR
-named \fIname\fR. The default type of the folder
-to create is cmis:folder, but this can be changed using --object-type option.
-.TP 
-create-document \fIparent-id name\fR
-Create a document in folder \fIparent-id\fR
-named \fIname\fR. The default type of the document
-to create is cmis:document, but this can be changed using --object-type option.
-
-Note that the --input-file and --input-type may be mandatory, depending on the type of
-the document to create and its constraints.
-.TP 
-update-object \fIobject-id\fR
-Replace the writeable properties given with --object-property option on the object
-matching id \fIobject-id\fR.
-.TP 
-type-by-id \fIarg...\fR
-Displays the infos and children (if any) of all the CMIS types corresponding
-to the listed ids.
-.TP 
-show-by-id \fIarg...\fR
-Displays the infos and children (if any) of all the CMIS objects corresponding
-to the listed ids.
-.TP 
-show-by-path \fIarg...\fR
-Displays the infos and children (if any) of all the CMIS objects corresponding
-to the listed paths.
-.TP 
-delete \fIarg...\fR
-Deletes the CMIS objects corresponding to the listed ids. If the node
-is a folder, its content will be removed as well.
-.SH USAGE
-Displays the root node of repository A1:
-.PP
-\fBcmis-client\fR -r A1 --url http://localhost/atom show-root
-.PP
-Displays the nodes with id 133 and 116 of repository A1:
-.PP
-\fBcmis-client\fR -r A1 --url http://localhost/atom show-by id 133 116
-.SH AUTHOR
-C\('edric Bosdonnat cbosdo
diff --git a/libcmis.pc.in b/libcmis.pc.in
index 549ca13..c9307f1 100644
--- a/libcmis.pc.in
+++ b/libcmis.pc.in
@@ -6,6 +6,7 @@ includedir=@includedir@
 Name: libcmis
 Description: CMIS protocol client library
 Version: @VERSION@
+Requires: libcurl libxml-2.0
 Libs: -L${libdir} -lcmis- at LIBCMIS_API_VERSION@
 Cflags: -I${includedir}/libcmis- at LIBCMIS_API_VERSION@
 
diff --git a/src/libcmis/Makefile.am b/src/libcmis/Makefile.am
index d4c36e1..cc8f55d 100644
--- a/src/libcmis/Makefile.am
+++ b/src/libcmis/Makefile.am
@@ -39,7 +39,7 @@ libcmis_ at LIBCMIS_API_VERSION@_la_SOURCES = \
 	property-type.cxx \
 	xml-utils.cxx
 
-libcmis_ at LIBCMIS_API_VERSION@_la_LDFLAGS = -export-dynamic -no-undefined -version-info 2:2:0
+libcmis_ at LIBCMIS_API_VERSION@_la_LDFLAGS = -export-dynamic -no-undefined -version-info 2:3:0
 
 libcmis_ at LIBCMIS_API_VERSION@_la_LIBADD = \
 	$(XML2_LIBS) \
diff --git a/src/libcmis/Makefile.in b/src/libcmis/Makefile.in
index a522099..fadab52 100644
--- a/src/libcmis/Makefile.in
+++ b/src/libcmis/Makefile.in
@@ -308,7 +308,7 @@ libcmis_ at LIBCMIS_API_VERSION@_la_SOURCES = \
 	property-type.cxx \
 	xml-utils.cxx
 
-libcmis_ at LIBCMIS_API_VERSION@_la_LDFLAGS = -export-dynamic -no-undefined -version-info 2:2:0
+libcmis_ at LIBCMIS_API_VERSION@_la_LDFLAGS = -export-dynamic -no-undefined -version-info 2:3:0
 libcmis_ at LIBCMIS_API_VERSION@_la_LIBADD = \
 	$(XML2_LIBS) \
 	$(CURL_LIBS) \
diff --git a/src/libcmis/atom-document.cxx b/src/libcmis/atom-document.cxx
index 754f2d9..bdcf62e 100644
--- a/src/libcmis/atom-document.cxx
+++ b/src/libcmis/atom-document.cxx
@@ -179,27 +179,74 @@ void AtomDocument::setContentStream( boost::shared_ptr< ostream > os, string con
         if ( overwrite )
             overwriteStr = "true";
 
-        string putUrl( m_contentUrl );
-        if ( putUrl.find( '?' ) != string::npos )
-            putUrl += "&";
+        string urlPattern( m_contentUrl );
+        if ( urlPattern.find( '?' ) != string::npos )
+            urlPattern += "&";
         else
-            putUrl += "?";
-        putUrl += "overwriteFlag=" + overwriteStr;
+            urlPattern += "?";
+        urlPattern += "overwriteFlag={overwriteFlag}";
+
+        map< string, string > params;
+        params["overwriteFlag"] = overwriteStr;
 
         // Use the changeToken if set on the object
         if ( !getChangeToken().empty() )
-            putUrl += "&changeToken=" + getChangeToken();
-
-        try
         {
-            istream is( os->rdbuf( ) );
-            getSession()->httpPutRequest( putUrl, is, contentType );
-            refresh( );
+            urlPattern += "&changeToken={changeToken}";
+            params["changeToken"] = getChangeToken();
         }
-        catch ( const atom::CurlException& e )
+
+        string putUrl = getSession()->createUrl( urlPattern, params );       
+
+        bool tryBase64 = false;
+        do
         {
-            throw e.getCmisException( );
+            try
+            {
+                boost::shared_ptr< istream> is ( new istream ( os->rdbuf( ) ) );
+                if ( tryBase64 )
+                {
+                    tryBase64 = false;
+
+                    // Encode the content
+                    stringstream* encodedIn = new stringstream( );
+                    atom::EncodedData encoder( encodedIn );
+                    encoder.setEncoding( "base64" );
+
+                    int bufLength = 1000;
+                    char* buf = new char[ bufLength ];
+                    do
+                    {
+                        is->read( buf, bufLength );
+                        int size = is->gcount( );
+                        encoder.encode( buf, 1, size );
+                    } while ( !is->eof( ) && !is->fail( ) );
+                    delete[] buf;
+                    encoder.finish( );
+
+                    encodedIn->seekg( 0, ios_base::beg );
+                    encodedIn->clear( );
+
+                    is.reset( encodedIn );
+                }
+                getSession()->httpPutRequest( putUrl, *is, contentType );
+
+                long httpStatus = getSession( )->getHttpStatus( );
+                if ( httpStatus < 200 || httpStatus >= 300 )
+                    throw libcmis::Exception( "Document content wasn't set for some reason" );
+                refresh( );
+            }
+            catch ( const atom::CurlException& e )
+            {
+                // SharePoint wants base64 encoded content... let's try to figure out
+                // if we falled in that case.
+                if ( !tryBase64 && e.getHttpStatus() == 400 )
+                    tryBase64 = true;
+                else
+                    throw e.getCmisException( );
+            }
         }
+        while ( tryBase64 );
     }
 }
 
diff --git a/src/libcmis/atom-object.cxx b/src/libcmis/atom-object.cxx
index 7a9d4c0..17be2b7 100644
--- a/src/libcmis/atom-object.cxx
+++ b/src/libcmis/atom-object.cxx
@@ -52,7 +52,9 @@ namespace
             bool operator() ( AtomLink link )
             {
                 bool matchesRel = link.getRel( ) == m_rel;
-                bool matchesType = m_type.empty( ) || ( link.getType( ) == m_type );
+
+                // Some implementation (SharePoint) are omitting the type attribute
+                bool matchesType = m_type.empty( ) || link.getType().empty() || ( link.getType( ) == m_type );
                 return matchesRel && matchesType;
             }
     };
@@ -486,15 +488,16 @@ AtomLink::AtomLink( xmlNodePtr node ) throw ( libcmis::Exception ):
     m_href( )
 {
     m_rel = libcmis::getXmlNodeAttributeValue( node, "rel" );
-    m_type = libcmis::getXmlNodeAttributeValue( node, "type" );
     m_href = libcmis::getXmlNodeAttributeValue( node, "href" );
     
     try
     {
+        m_type = libcmis::getXmlNodeAttributeValue( node, "type" );
         m_id = libcmis::getXmlNodeAttributeValue( node, "id" );
     }
     catch ( const libcmis::Exception & )
     {
         // id attribute can be missing
+        // type attribute is missing in some implementations (SharePoint)
     }
 }
diff --git a/src/libcmis/atom-session.cxx b/src/libcmis/atom-session.cxx
index c41f804..185df9d 100644
--- a/src/libcmis/atom-session.cxx
+++ b/src/libcmis/atom-session.cxx
@@ -25,6 +25,7 @@
  * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
  * instead of those above.
  */
+#include <cctype>
 #include <string>
 
 #include <libxml/parser.h>
@@ -105,6 +106,16 @@ namespace
         }
         return errCode;
     }
+
+    string lcl_tolower( string sText )
+    {
+        string lower( sText );
+        for ( size_t i = 0; i < sText.size(); ++i )
+        {
+            lower[i] = ::tolower( sText[i] );
+        }
+        return lower;
+    }
 }
 
 AtomPubSession::AtomPubSession( string atomPubUrl, string repository, 
@@ -211,7 +222,9 @@ void AtomPubSession::initialize( ) throw ( libcmis::Exception )
                         try
                         {
                             atom::Workspace ws( xpathObj->nodesetval->nodeTab[i] );
-                            if ( ws.getId( ) == m_sRepository )
+
+                            // SharePoint is case insensitive for the id...
+                            if ( lcl_tolower( ws.getId( ) ) == lcl_tolower( m_sRepository ) )
                                 m_workspace = ws;
 
                             m_repositoriesIds.push_back( ws.getId() );
@@ -382,7 +395,7 @@ string AtomPubSession::createUrl( const string& pattern, map< string, string > v
         if ( pos != string::npos )
         {
             // Escape the URL by chunks
-#if LIBCURL_VERSION_VALUE >= 71504
+#if LIBCURL_VERSION_VALUE >= 0x071504
             char* escaped = curl_easy_escape( m_curlHandle, value.c_str(), value.length() );
 #else
             char* escaped = curl_escape( value.c_str(), value.length() );
@@ -469,7 +482,7 @@ string AtomPubSession::httpPutRequest( string url, istream& is, string contentTy
         httpRunRequest( url );
         data->finish();
     }
-    catch ( const atom::CurlException& e )
+    catch ( atom::CurlException& e )
     {
         delete data;
         curl_slist_free_all( headers_slist );
@@ -550,7 +563,7 @@ void AtomPubSession::httpRunRequest( string url ) throw ( atom::CurlException )
     {
         curl_easy_setopt( m_curlHandle, CURLOPT_HTTPAUTH, CURLAUTH_ANY );
 
-#if LIBCURL_VERSION_VALUE >= 71901
+#if LIBCURL_VERSION_VALUE >= 0x071901
         curl_easy_setopt( m_curlHandle, CURLOPT_USERNAME, m_username.c_str() );
         curl_easy_setopt( m_curlHandle, CURLOPT_PASSWORD, m_password.c_str() );
 #else
@@ -574,7 +587,19 @@ void AtomPubSession::httpRunRequest( string url ) throw ( atom::CurlException )
     curl_easy_reset( m_curlHandle );
 
     if ( CURLE_OK != errCode )
-        throw atom::CurlException( string( errBuff ), errCode, url );
+    {
+        long httpError = 0;
+        curl_easy_getinfo( m_curlHandle, CURLINFO_RESPONSE_CODE, &httpError );
+        throw atom::CurlException( string( errBuff ), errCode, url, httpError );
+    }
+}
+
+long AtomPubSession::getHttpStatus( )
+{
+    long status = 0;
+    curl_easy_getinfo( m_curlHandle, CURLINFO_RESPONSE_CODE, &status );
+
+    return status;
 }
 
 namespace atom
@@ -593,26 +618,22 @@ namespace atom
     {
         string msg;
 
-        if ( ( CURLE_HTTP_RETURNED_ERROR == m_code ) &&
-             ( string::npos != m_message.find( "403" ) ) )
+        switch ( m_httpStatus )
         {
-            msg = "Invalid credentials";
-        }
-        else if ( ( CURLE_HTTP_RETURNED_ERROR == m_code ) &&
-             ( string::npos != m_message.find( "404" ) ) )
-        {
-            msg = "Invalid URL: " + m_url;
-        }
-        else if ( ( CURLE_HTTP_RETURNED_ERROR == m_code ) && 
-             ( string::npos != m_message.find( "409" ) ) )
-        {
-            msg = "Editing conflict error";
-        }
-        else
-        {
-            msg = what();
-            if ( !isCancelled( ) )
-                msg += ": " + m_url;
+            case 403:
+                msg = "Invalid credentials";
+                break;
+            case 404:
+                msg = "Invalid URL: " + m_url;
+                break;
+            case 409:
+                msg = "Editing conflict error";
+                break;
+            default:
+                msg = what();
+                if ( !isCancelled( ) )
+                    msg += ": " + m_url;
+                break;
         }
 
         return libcmis::Exception( msg );
diff --git a/src/libcmis/atom-session.hxx b/src/libcmis/atom-session.hxx
index 715551a..35e7903 100644
--- a/src/libcmis/atom-session.hxx
+++ b/src/libcmis/atom-session.hxx
@@ -50,15 +50,17 @@ namespace atom
             std::string m_message;
             CURLcode    m_code;
             std::string m_url;
+            long        m_httpStatus;
 
             bool        m_cancelled;
 
         public:
-            CurlException( std::string message, CURLcode code, std::string url ) :
+            CurlException( std::string message, CURLcode code, std::string url, long httpStatus ) :
                 exception( ),
                 m_message( message ),
                 m_code( code ),
                 m_url( url ),
+                m_httpStatus( httpStatus ),
                 m_cancelled( false )
             {
             }
@@ -68,6 +70,7 @@ namespace atom
                 m_message( message ),
                 m_code( CURLE_OK ),
                 m_url( ),
+                m_httpStatus( 0 ),
                 m_cancelled( true )
             {
             }
@@ -78,6 +81,7 @@ namespace atom
             CURLcode getErrorCode( ) const { return m_code; }
             std::string getErrorMessage( ) const { return m_message; }
             bool isCancelled( ) const { return m_cancelled; }
+            long getHttpStatus( ) const { return m_httpStatus; }
 
             libcmis::Exception getCmisException ( ) const;
     };
@@ -134,6 +138,8 @@ class AtomPubSession : public libcmis::Session
 
         void httpRunRequest( std::string url ) throw ( atom::CurlException );
 
+        long getHttpStatus( );
+
         // Override session methods
 
         virtual libcmis::FolderPtr getRootFolder() throw ( libcmis::Exception );
diff --git a/src/libcmis/atom-utils.cxx b/src/libcmis/atom-utils.cxx
index bbb9672..d658482 100644
--- a/src/libcmis/atom-utils.cxx
+++ b/src/libcmis/atom-utils.cxx
@@ -229,7 +229,8 @@ namespace atom
         size_t i = 0;
         while ( i < len )
         {
-            blockValue += buf[i] << ( 2 - byteRank ) * 8;
+            // Cast the char to an unsigned char or we'll shift negative values
+            blockValue += static_cast< unsigned char >( buf[i] ) << ( 2 - byteRank ) * 8;
             ++byteRank;
 
             // Reached the end of a block, encode it

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/libcmis.git



More information about the Pkg-openoffice-commits mailing list