Possible compatibility problems with earlier versions marked with '*'.
+Fixes for Chunked encoding. White space not ignored after length spec.
+
Update NS and use default NS for SRW diagnostic elements.
--- 2.0.13 2004/02/23
dnl YAZ Toolkit, Index Data 1994-2004
dnl See the file LICENSE for details.
-dnl $Id: configure.in,v 1.129 2004-02-23 09:30:17 adam Exp $
+dnl $Id: configure.in,v 1.130 2004-02-25 12:59:56 adam Exp $
AC_INIT(include/yaz/yaz-version.h)
-AM_INIT_AUTOMAKE(yaz, 2.0.13)
+AM_INIT_AUTOMAKE(yaz, 2.0.14)
AM_MAINTAINER_MODE
dnl
AC_SUBST(READLINE_LIBS)
+yaz (2.0.14-1) unstable; urgency=low
+
+ * Upstream.
+
+ -- Adam Dickmeiss <adam@indexdata.dk> Wed, 25 Feb 2004 13:58:34 +0100
+
yaz (2.0.13-2) unstable; urgency=low
* API version 2.0.13. Fix NS for diagnostic elements.
* Copyright (c) 1995-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-version.h,v 1.38 2004-02-23 09:30:17 adam Exp $
+ * $Id: yaz-version.h,v 1.39 2004-02-25 12:59:56 adam Exp $
*/
/*
#include <yaz/yconfig.h>
-#define YAZ_VERSION "2.0.13"
-#define YAZ_VERSIONL 0x02000D
+#define YAZ_VERSION "2.0.14"
+#define YAZ_VERSIONL 0x02000E
#define YAZ_DATE 1
* Copyright (c) 1995-2004, Index Data
* See the file LICENSE for details.
*
- * $Id: comstack.c,v 1.5 2004-02-19 23:20:44 adam Exp $
+ * $Id: comstack.c,v 1.6 2004-02-25 12:59:56 adam Exp $
*/
#include <string.h>
/* inside chunked body .. */
while(1)
{
- int chunk_len = 0;
+ int j, chunk_len = 0;
i += 2;
#if CHUNK_DEBUG
/* debugging */
printf (">>>\n");
}
#endif
+ /* read chunk length */
while (1)
if (i >= len-2) {
#if CHUNK_DEBUG
(buf[i++] - ('a'-10));
else
break;
- if (buf[i] != '\r' || buf[i+1] != '\n' ||
- chunk_len < 0)
- return i+2; /* bad. stop now */
+ /* move forward until CRLF - skip chunk ext */
+ j = 0;
+ while (buf[i] != '\r' && buf[i+1] != '\n')
+ {
+ if (i >= len-2)
+ return 0; /* need more buffer .. */
+ if (++j > 1000)
+ return i; /* enough.. stop */
+ i++;
+ }
+ /* got CRLF */
#if CHUNK_DEBUG
printf ("XXXXXX chunk_len=%d\n", chunk_len);
#endif
+ if (chunk_len < 0)
+ return i+2; /* bad chunk_len */
if (chunk_len == 0)
- {
- /* consider trailing headers .. */
- while(i <= len-4)
- {
- if (buf[i] == '\r' && buf[i+1] == '\n' &&
- buf[i+2] == '\r' && buf[i+3] == '\n')
- if (len >= i+4)
- return i+4;
- i++;
- }
+ break;
+ i += chunk_len+2;
+ }
+ /* consider trailing headers .. */
+ while(i <= len-4)
+ {
+ if (buf[i] == '\r' && buf[i+1] == '\n' &&
+ buf[i+2] == '\r' && buf[i+3] == '\n')
+ if (len >= i+4)
+ return i+4;
+ i++;
+ }
#if CHUNK_DEBUG
/* debugging */
- printf ("XXXXXXXXX not there yet 2\n");
- printf ("i=%d len=%d\n", i, len);
+ printf ("XXXXXXXXX not there yet 2\n");
+ printf ("i=%d len=%d\n", i, len);
#endif
- return 0;
- }
- i += chunk_len+2;
- }
+ return 0;
}
else
{ /* not chunked ; inside body */
* Copyright (c) 2002-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: zgdu.c,v 1.8 2004-02-25 10:37:02 adam Exp $
+ * $Id: zgdu.c,v 1.9 2004-02-25 12:59:56 adam Exp $
*/
#include <ctype.h>
{
int off = 0;
- /* we know buffer will be smaller than o->size - i - 2*/
- *content_buf = (char*) odr_malloc(o, o->size - i - 2);
+ /* we know buffer will be smaller than o->size - i*/
+ *content_buf = (char*) odr_malloc(o, o->size - i);
while (1)
{
+ /* chunk length .. */
int chunk_len = 0;
for (; i < o->size-2; i++)
if (isdigit(o->buf[i]))
(o->buf[i] - ('a'-10));
else
break;
- if (i > o->size - 2)
- break;
- if (o->buf[i] != '\r' || o->buf[i+1] != '\n')
- { /* chunk length must be followed by \r\n */
- o->error = OHTTP;
- return 0;
+ /* chunk extension ... */
+ while (o->buf[i] != '\r' && o->buf[i+1] != '\n')
+ {
+ if (i >= o->size-2)
+ {
+ o->error = OHTTP;
+ return 0;
+ }
+ i++;
}
- i += 2;
+ i += 2; /* skip CRLF */
if (chunk_len == 0)
break;
if (chunk_len < 0 || off + chunk_len > o->size)
o->error = OHTTP;
return 0;
}
+ /* copy chunk .. */
memcpy (*content_buf + off, o->buf + i, chunk_len);
- i += chunk_len;
+ i += chunk_len + 2; /* skip chunk+CRLF */
off += chunk_len;
}
if (!off)
-; $Id: yaz.nsi,v 1.36 2004-02-23 09:30:18 adam Exp $
+; $Id: yaz.nsi,v 1.37 2004-02-25 12:59:57 adam Exp $
-!define VERSION "2.0.13"
+!define VERSION "2.0.14"
Name "YAZ"
Caption "Index Data YAZ ${VERSION} Setup"
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,13,1
- PRODUCTVERSION 2,0,13,1
+ FILEVERSION 2,0,14,1
+ PRODUCTVERSION 2,0,14,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
VALUE "Comments", "Z39.50 C Library\0"
VALUE "CompanyName", "Index Data\0"
VALUE "FileDescription", "YAZ Toolkit\0"
- VALUE "FileVersion", "2, 0, 13, 1\0"
+ VALUE "FileVersion", "2, 0, 14, 1\0"
VALUE "InternalName", "YAZ\0"
VALUE "LegalCopyright", "Copyright © 1995-2004 Index Data\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "yaz.rc\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Index Data YAZ Toolkit\0"
- VALUE "ProductVersion", "2, 0, 13, 1\0"
+ VALUE "ProductVersion", "2, 0, 14, 1\0"
VALUE "SpecialBuild", "\0"
END
END