[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#165101: marked as done (libghttp1: ghttp_flush_response_buffer() induces failures on requests of unpredictable length)

Your message dated Tue, 06 Jan 2004 18:32:22 -0500
with message-id <E1Ae0gQ-00044F-00@auric.debian.org>
and subject line Bug#165101: fixed in libghttp 1.0.9-14
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at submit) by bugs.debian.org; 16 Oct 2002 22:00:20 +0000
>From devin@bluemug.com Wed Oct 16 17:00:20 2002
Return-path: <devin@bluemug.com>
Received: from barbados.bluemug.com [] (person)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 181wDE-0007tq-00; Wed, 16 Oct 2002 17:00:20 -0500
Received: from fiji.bluemug.com ([] ident=mail)
	by barbados.bluemug.com with esmtp (Exim 3.35 #1)
	id 181wDD-0001qu-00; Wed, 16 Oct 2002 15:00:19 -0700
Received: from caladan.dyn.bluemug.com ([] helo=caladan)
	by fiji.bluemug.com with esmtp (Exim 3.35 #1)
	id 181wDE-00037s-00; Wed, 16 Oct 2002 15:00:20 -0700
Received: from devin by caladan with local (Exim 3.36 #1 (Debian))
	id 181wDC-0007mK-00; Wed, 16 Oct 2002 15:00:18 -0700
From: Devin Carraway <debbugs-libghttp-20021016@nospam.devin.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libghttp1: ghttp_flush_response_buffer() induces failures on requests of unpredictable length
X-Mailer: reportbug 1.50
Date: Wed, 16 Oct 2002 15:00:18 -0700
Message-Id: <E181wDC-0007mK-00@caladan>
Sender: Devin Carraway <devin@caladan>
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=2.2 required=5.0
X-Spam-Level: **

Package: libghttp1
Version: 1.0.9-9
Severity: normal

When conducting an async-mode ghttp transfer of a URI whose webserver
did not provide a Content-Length: header, using
ghttp_flush_response_buffer() will induce an "Unknown error" failure at
the end of the transfer.

Sample code appears below.  Compiled and run with an argument of
"http://www.debian.org/"; (which furnishes a Content-Length header) it
runs to successful completion.  Run against http://base.debian.net/
(which does not), it fails.  If the call to
ghttp_flush_response_buffer() is commented out, it runs to completion in
either case.

$ ./simple-get http://www.debian.org/
conn0: response-headers [0/0]
conn0: response [585/-1]
conn0: response [1009/14704]
conn0: response [2033/14704]
conn0: response [13617/14704]
conn0: response [14641/14704]
conn0: none [0/0]
conn0 received 160979 bytes

$ ./simple-get http://base.debian.net/
conn0: response-headers [0/0]
conn0: response [0/-1]
conn0: response [1443/-1]
conn0: response [1602/-1]
conn0: response [1688/-1]
conn0: response [1696/-1]
conn0: response [2997/-1]
conn0: response [4021/-1]
ghttp err: Unknown Error.

/* simple-get.c */

#include <stdio.h>
#include <ghttp.h>
#include <unistd.h>

void bail(char *s)
	fputs(s, stderr); fputc('\n', stderr);

void status(ghttp_request *r, char *desc)
	ghttp_current_status st;

	st = ghttp_get_status(r);
	fprintf(stderr, "%s: %s [%d/%d]\n",
			st.proc == ghttp_proc_request ? "request" :
			st.proc == ghttp_proc_response_hdrs ? "response-headers" :
			st.proc == ghttp_proc_response ? "response" : "none",
			st.bytes_read, st.bytes_total);

int main(int argc, char **argv)
	int bytes = 0;
	ghttp_request *req;
	ghttp_status req_status;

	if (argc < 2) bail("usage: simple-get URI");

	req = ghttp_request_new();
	if (ghttp_set_uri(req,argv[1]) < 0)
	if (ghttp_prepare(req) < 0)

	if (ghttp_set_sync(req, ghttp_async) < 0)

	do {
		status(req, "conn0");
		req_status = ghttp_process(req);

		if (req_status == ghttp_error) {
			fprintf(stderr, "ghttp err: %s\n",
			return 2;

		if (req_status != ghttp_error && ghttp_get_body_len(req) > 0) {
			bytes += ghttp_get_body_len(req);
	} while (req_status == ghttp_not_done);

	fprintf(stderr, "conn0 received %d bytes\n", bytes);
	return 0;

-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux caladan 2.4.18 #1 Wed Apr 10 15:31:03 PDT 2002 i686

Versions of packages libghttp1 depends on:
ii  libc6                         2.2.5-14.3 GNU C Library: Shared libraries an

Received: (at 165101-close) by bugs.debian.org; 7 Jan 2004 04:21:14 +0000
>From katie@auric.debian.org Tue Jan 06 22:21:14 2004
Return-path: <katie@auric.debian.org>
Received: from auric.debian.org [] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Ae0jL-0007Dt-00; Tue, 06 Jan 2004 17:35:23 -0600
Received: from katie by auric.debian.org with local (Exim 3.35 1 (Debian))
	id 1Ae0gQ-00044F-00; Tue, 06 Jan 2004 18:32:22 -0500
From: mkedeb@sane.net (Michael K. Edwards (in Debian context))
To: 165101-close@bugs.debian.org
X-Katie: $Revision: 1.43 $
Subject: Bug#165101: fixed in libghttp 1.0.9-14
Message-Id: <E1Ae0gQ-00044F-00@auric.debian.org>
Sender: Archive Administrator <katie@auric.debian.org>
Date: Tue, 06 Jan 2004 18:32:22 -0500
Delivered-To: 165101-close@bugs.debian.org

Source: libghttp
Source-Version: 1.0.9-14

We believe that the bug you reported is fixed in the latest version of
libghttp, which is due to be installed in the Debian FTP archive:

  to pool/main/libg/libghttp/libghttp-dev_1.0.9-14_powerpc.deb
  to pool/main/libg/libghttp/libghttp1_1.0.9-14_powerpc.deb
  to pool/main/libg/libghttp/libghttp_1.0.9-14.diff.gz
  to pool/main/libg/libghttp/libghttp_1.0.9-14.dsc

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 165101@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Michael K. Edwards (in Debian context) <mkedeb@sane.net> (supplier of updated libghttp package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)

Hash: SHA1

Format: 1.7
Date: Sun, 28 Dec 2003 20:33:59 -0800
Source: libghttp
Binary: libghttp1 libghttp-dev
Architecture: source powerpc
Version: 1.0.9-14
Distribution: unstable
Urgency: low
Maintainer: Michael K. Edwards (in Debian context) <mkedeb@sane.net>
Changed-By: Michael K. Edwards (in Debian context) <mkedeb@sane.net>
 libghttp-dev - original GNOME HTTP client library - development kit
 libghttp1  - original GNOME HTTP client library - run-time kit
Closes: 165101 210202
 libghttp (1.0.9-14) unstable; urgency=low
   * New maintainer (closes: Bug#210202)
     - this package is still needed by 'libhttp-ghttp-perl'
   * Re-debianized to current packaging standards
   * Moved to oldlibs
   * Standards-Version --> 3.6.1
   * Fixed chunked encoding allocation and flushing (closes: Bug#165101)
   * Added simple-get example from bug report (thanks to Devin Carraway
 2d0f0a27c6b7bb0143ccedea003a4b57 715 net optional libghttp_1.0.9-14.dsc
 9c1d7842cc9070295719cceb3fd138c7 6493 net optional libghttp_1.0.9-14.diff.gz
 80a83c647f66fb9a4569d2e3259420f2 21086 oldlibs optional libghttp1_1.0.9-14_powerpc.deb
 e4811b3bdfc5e198e4d70bfa0528ab2c 39388 oldlibs optional libghttp-dev_1.0.9-14_powerpc.deb

Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Colin Watson <cjwatson@debian.org> -- Debian developer


Reply to: