* Copyright (c) 2002-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: zgdu.c,v 1.7 2003-02-20 15:12:28 adam Exp $
+ * $Id: zgdu.c,v 1.9 2003-03-11 11:09:17 adam Exp $
*/
-#include <yaz/proto.h>
+#include <yaz/odr.h>
+#include <yaz/yaz-version.h>
+#include <yaz/zgdu.h>
static int decode_headers_content(ODR o, int off, Z_HTTP_Header **headers,
char **content_buf, int *content_len)
}
else /* ENCODE or PRINT */
{
+ int top0 = o->top;
char sbuf[80];
Z_HTTP_Header *h;
switch((*p)->which)
(*p)->u.HTTP_Response->content_len);
if (o->direction == ODR_PRINT)
{
- fprintf(o->print, "-- HTTP response:\n%.*s\n", o->top, o->buf);
+ fprintf(o->print, "-- HTTP response:\n%.*s\n", o->top - top0,
+ o->buf + top0);
+ fprintf(o->print, "-- \n");
}
break;
case Z_GDU_HTTP_Request: