From halley.zhao@intel.com Wed Sep 1 01:38:05 2010 Return-Path: X-Original-To: libsoup-list@gnome.org Delivered-To: libsoup-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 3D90975010A for ; Wed, 1 Sep 2010 01:38:05 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.209 X-Spam-Level: X-Spam-Status: No, score=-4.209 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id veeve-CqaXb1 for ; Wed, 1 Sep 2010 01:38:03 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by menubar.gnome.org (Postfix) with ESMTP id D178E7500F0 for ; Wed, 1 Sep 2010 01:37:54 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 31 Aug 2010 18:37:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.56,301,1280732400"; d="scan'208,217";a="653089387" Received: from pgsmsx603.gar.corp.intel.com ([10.221.43.87]) by orsmga001.jf.intel.com with ESMTP; 31 Aug 2010 18:37:52 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.239.4.112) by pgsmsx603.gar.corp.intel.com (10.221.43.87) with Microsoft SMTP Server (TLS) id 8.2.254.0; Wed, 1 Sep 2010 09:36:17 +0800 Received: from shsmsx502.ccr.corp.intel.com ([10.239.4.96]) by shsmsx601.ccr.corp.intel.com ([10.239.4.112]) with mapi; Wed, 1 Sep 2010 09:36:13 +0800 From: "Zhao, Halley" To: "'libsoup-list@gnome.org'" Date: Wed, 1 Sep 2010 09:36:12 +0800 Subject: Is there cached file saved to disk when using soup? Thread-Topic: Is there cached file saved to disk when using soup? Thread-Index: ActJdg+DdZ8WUdaSTB29JjT9ME+PLA== Message-ID: <5D8008F58939784290FAB48F549751982784EE453E@shsmsx502.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_5D8008F58939784290FAB48F549751982784EE453Eshsmsx502ccrc_" MIME-Version: 1.0 X-BeenThere: libsoup-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "discussion of libsoup, an HTTP library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2010 01:38:05 -0000 --_000_5D8008F58939784290FAB48F549751982784EE453Eshsmsx502ccrc_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Does soup save files to disk in progress downloaded? When I use gstreamer/souphttpsrc to playback some online content, I notice = the player try to buffer/cache some content. Is it done by soup? Does the cache function result in a file stored on disk= ? ZHAO, Halley (Aihua) Email: halley.zhao@intel.com Tel: +86(21)61166476 iNet: 8821-6476 SSG/OTC/Moblin 3W038 Pole: F4 --_000_5D8008F58939784290FAB48F549751982784EE453Eshsmsx502ccrc_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Does soup save files to disk in progress downloade= d?

 

When I use gstreamer/souphttpsrc to playback some online content, I notice the player try to buffer/cache some content.<= /o:p>

Is it done by soup? Does the cache function result= in a file stored on disk?

 

 

ZH= AO, Halley (Aihua)

Email: halley.zhao<= a href=3D"BLOCKED::mailto:aihua.zhao@intel.com" title=3D"mailto:aihua.zhao@intel.com mailto:hui.xue@intel.com">@intel.c= om

Tel: +86(21)61166476=

iNet: 8821-6476

SSG/OTC/Moblin 3= W038 Pole: F4

 

--_000_5D8008F58939784290FAB48F549751982784EE453Eshsmsx502ccrc_-- From svillar@igalia.com Wed Sep 1 08:42:52 2010 Return-Path: X-Original-To: libsoup-list@gnome.org Delivered-To: libsoup-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D5BFD75031F for ; Wed, 1 Sep 2010 08:42:52 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.581 X-Spam-Level: X-Spam-Status: No, score=-0.581 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SARE_LWSHORTT=1.24, SPF_NEUTRAL=0.779] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JzfLsx3mfKbN for ; Wed, 1 Sep 2010 08:42:51 +0000 (UTC) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by menubar.gnome.org (Postfix) with ESMTP id AEB3B7502BA for ; Wed, 1 Sep 2010 08:42:42 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuUOAC+vfUxbdWOb/2dsb2JhbACTP4cNgQKGA71dhTkEihE X-IronPort-AV: E=Sophos;i="4.56,303,1280700000"; d="scan'208";a="757086364" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 01 Sep 2010 10:42:24 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1Oqitk-0004aa-T8 for ; Wed, 01 Sep 2010 10:42:24 +0200 Received: from ip194.dynamic.igalia.com ([192.168.10.194] ident=sergio) by mail.igalia.com with esmtps (Cipher TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim) id 1Oqitk-0000sL-MQ for ; Wed, 01 Sep 2010 10:42:24 +0200 Message-ID: <4C7E11EF.30009@igalia.com> Date: Wed, 01 Sep 2010 10:42:23 +0200 From: Sergio Villar Senin User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100619 Icedove/3.0.5 MIME-Version: 1.0 To: libsoup-list@gnome.org Subject: Re: Is there cached file saved to disk when using soup? References: <5D8008F58939784290FAB48F549751982784EE453E@shsmsx502.ccr.corp.intel.com> In-Reply-To: <5D8008F58939784290FAB48F549751982784EE453E@shsmsx502.ccr.corp.intel.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: libsoup-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "discussion of libsoup, an HTTP library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2010 08:42:53 -0000 En 01/09/10 03:36, Zhao, Halley escribiu: > Does soup save files to disk in progress downloaded? If you mean HTTP cache you can check the current status here: https://bugzilla.gnome.org/show_bug.cgi?id=523100 As that code is not going to land in libsoup in the short term we moved temporarily part of it to webkit https://bugs.webkit.org/show_bug.cgi?id=44261 in order to enable on-disk cache. That soup cache stuff depends on a refactoring inside libsoup, see: https://bugzilla.gnome.org/show_bug.cgi?id=557777 > When I use gstreamer/souphttpsrc to playback some online content, I > notice the player try to buffer/cache some content. > > Is it done by soup? Does the cache function result in a file stored on disk? At least in WebKitGtk+ when using the gstplayer the content is stored in /tmp when preload=auto. BR From halley.zhao@intel.com Thu Sep 2 07:32:21 2010 Return-Path: X-Original-To: libsoup-list@gnome.org Delivered-To: libsoup-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0553B7503CF for ; Thu, 2 Sep 2010 07:32:21 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.97 X-Spam-Level: X-Spam-Status: No, score=-2.97 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SARE_LWSHORTT=1.24, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9i-KDhXxHZrA for ; Thu, 2 Sep 2010 07:32:17 +0000 (UTC) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by menubar.gnome.org (Postfix) with ESMTP id 2E64A7503BC for ; Thu, 2 Sep 2010 07:32:06 +0000 (UTC) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 02 Sep 2010 00:32:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.56,307,1280732400"; d="scan'208";a="602957662" Received: from pgsmsx603.gar.corp.intel.com ([10.221.43.87]) by fmsmga002.fm.intel.com with ESMTP; 02 Sep 2010 00:32:04 -0700 Received: from shsmsx602.ccr.corp.intel.com (10.239.4.104) by pgsmsx603.gar.corp.intel.com (10.221.43.87) with Microsoft SMTP Server (TLS) id 8.2.254.0; Thu, 2 Sep 2010 15:31:56 +0800 Received: from shsmsx502.ccr.corp.intel.com ([10.239.4.96]) by SHSMSX602.ccr.corp.intel.com ([10.239.4.104]) with mapi; Thu, 2 Sep 2010 15:31:52 +0800 From: "Zhao, Halley" To: Sergio Villar Senin , "libsoup-list@gnome.org" Date: Thu, 2 Sep 2010 15:31:51 +0800 Subject: RE: Is there cached file saved to disk when using soup? Thread-Topic: Is there cached file saved to disk when using soup? Thread-Index: ActJsbC6hW6tB1ujS7mVHmBm2rcN9wAvzDPg Message-ID: <5D8008F58939784290FAB48F549751982784FC5C2B@shsmsx502.ccr.corp.intel.com> References: <5D8008F58939784290FAB48F549751982784EE453E@shsmsx502.ccr.corp.intel.com> <4C7E11EF.30009@igalia.com> In-Reply-To: <4C7E11EF.30009@igalia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-BeenThere: libsoup-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "discussion of libsoup, an HTTP library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2010 07:32:21 -0000 R3JlYXQgdGhhbmtzLg0KVW5kZXJzdGFuZCBzb21lDQoNCi0tLS0tT3JpZ2luYWwgTWVzc2FnZS0t LS0tDQpGcm9tOiBsaWJzb3VwLWxpc3QtYm91bmNlc0Bnbm9tZS5vcmcgW21haWx0bzpsaWJzb3Vw LWxpc3QtYm91bmNlc0Bnbm9tZS5vcmddIE9uIEJlaGFsZiBPZiBTZXJnaW8gVmlsbGFyIFNlbmlu DQpTZW50OiAyMDEwxOo51MIxyNUgMTY6NDINClRvOiBsaWJzb3VwLWxpc3RAZ25vbWUub3JnDQpT dWJqZWN0OiBSZTogSXMgdGhlcmUgY2FjaGVkIGZpbGUgc2F2ZWQgdG8gZGlzayB3aGVuIHVzaW5n IHNvdXA/DQoNCkVuIDAxLzA5LzEwIDAzOjM2LCBaaGFvLCBIYWxsZXkgZXNjcmliaXU6DQo+IERv ZXMgc291cCBzYXZlIGZpbGVzIHRvIGRpc2sgaW4gcHJvZ3Jlc3MgZG93bmxvYWRlZD8NCg0KSWYg eW91IG1lYW4gSFRUUCBjYWNoZSB5b3UgY2FuIGNoZWNrIHRoZSBjdXJyZW50IHN0YXR1cyBoZXJl Og0KaHR0cHM6Ly9idWd6aWxsYS5nbm9tZS5vcmcvc2hvd19idWcuY2dpP2lkPTUyMzEwMA0KDQpB cyB0aGF0IGNvZGUgaXMgbm90IGdvaW5nIHRvIGxhbmQgaW4gbGlic291cCBpbiB0aGUgc2hvcnQg dGVybSB3ZSBtb3ZlZA0KdGVtcG9yYXJpbHkgcGFydCBvZiBpdCB0byB3ZWJraXQNCmh0dHBzOi8v YnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD00NDI2MSBpbiBvcmRlciB0byBlbmFibGUg b24tZGlzaw0KY2FjaGUuDQoNClRoYXQgc291cCBjYWNoZSBzdHVmZiBkZXBlbmRzIG9uIGEgcmVm YWN0b3JpbmcgaW5zaWRlIGxpYnNvdXAsIHNlZToNCmh0dHBzOi8vYnVnemlsbGEuZ25vbWUub3Jn L3Nob3dfYnVnLmNnaT9pZD01NTc3NzcNCg0KPiBXaGVuIEkgdXNlIGdzdHJlYW1lci9zb3VwaHR0 cHNyYyB0byBwbGF5YmFjayBzb21lIG9ubGluZSBjb250ZW50LCBJDQo+IG5vdGljZSB0aGUgcGxh eWVyIHRyeSB0byBidWZmZXIvY2FjaGUgc29tZSBjb250ZW50Lg0KPiANCj4gSXMgaXQgZG9uZSBi eSBzb3VwPyBEb2VzIHRoZSBjYWNoZSBmdW5jdGlvbiByZXN1bHQgaW4gYSBmaWxlIHN0b3JlZCBv biBkaXNrPw0KDQpBdCBsZWFzdCBpbiBXZWJLaXRHdGsrIHdoZW4gdXNpbmcgdGhlIGdzdHBsYXll ciB0aGUgY29udGVudCBpcyBzdG9yZWQgaW4NCi90bXAgd2hlbiBwcmVsb2FkPWF1dG8uDQoNCkJS DQpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXw0KbGlic291 cC1saXN0IG1haWxpbmcgbGlzdA0KbGlic291cC1saXN0QGdub21lLm9yZw0KaHR0cDovL21haWwu Z25vbWUub3JnL21haWxtYW4vbGlzdGluZm8vbGlic291cC1saXN0DQo= From rune.saetre@aptomar.com Tue Sep 21 00:04:31 2010 Return-Path: X-Original-To: libsoup-list@gnome.org Delivered-To: libsoup-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5D156750216 for ; Tue, 21 Sep 2010 00:04:31 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.918 X-Spam-Level: X-Spam-Status: No, score=-0.918 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RDNS_DYNAMIC=0.982] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kHa97xUvHiU6 for ; Tue, 21 Sep 2010 00:04:29 +0000 (UTC) X-Greylist: delayed 1055 seconds by postgrey-1.32 at menubar.gnome.org; Tue, 21 Sep 2010 00:04:28 UTC Received: from mail.aptomar.com (84-16-211.226.3p.ntebredband.no [84.16.211.226]) by menubar.gnome.org (Postfix) with ESMTP id CFC3375010B for ; Tue, 21 Sep 2010 00:04:20 +0000 (UTC) Received: from 84-16-211.227.3p.ntebredband.no ([84.16.211.227]:37061 helo=mail.aptomar.com) by mail.aptomar.com with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1OxqAp-0000mM-GO for libsoup-list@gnome.org; Tue, 21 Sep 2010 01:53:27 +0200 Received: from localhost ([::ffff:127.0.0.1]) by mail.aptomar.com with ESMTP (TLS encrypted); Tue, 21 Sep 2010 01:46:37 +0200 Date: Tue, 21 Sep 2010 01:46:35 +0200 (CEST) From: Rune Saetre X-X-Sender: rst@pingle.local.rsnet To: libsoup-list@gnome.org Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="279707905-2018299664-1285026395=:4384" X-SA-Exim-Connect-IP: 84.16.211.227 X-SA-Exim-Mail-From: rune.saetre@aptomar.com Subject: Disconnecting clients from SoupServer X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:20:07 +0000) X-SA-Exim-Scanned: Yes (on mail.aptomar.com) X-Mailman-Approved-At: Tue, 21 Sep 2010 11:18:14 +0000 Cc: Rune Saetre X-BeenThere: libsoup-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "discussion of libsoup, an HTTP library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2010 00:04:31 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --279707905-2018299664-1285026395=:4384 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Hi I am using libsoup to write a web server application that delivers data at= =20 a constant rate to clients. As data becomes ready I call=20 soup_message_body_append() and soup_server_unpause_message(), and I can=20 monitor progress by connecting to the signals SoupMessage::wrote-chunk or= =20 SoupMessage::wrote-body-data. If clients do not read the data fast enough or if they hang completely the= =20 server needs to disconnect the clients. How can this be done? I have tried using soup_client_context_get_socket() to get the SoupSocket= =20 for the client connection and then calling soup_socket_disconnect(),=20 hoping that this would trigger the same behaviour as when the client=20 closes the TCP connection. But so far I have only ended up with a libsoup= =20 in an unusable state, where it usually segfaults at some random=20 location shortly afterwarsd. Is it safe calling soup_socket_disconnect() from a different thread than=20 the one running GMainLoop? How about calling it from signal handlers, are= =20 there any that should be avoided? Are there alternatives to to=20 soup_socket_disconnect() for disconnecting nonresponsive clients? Regards Rune S=E6tre --279707905-2018299664-1285026395=:4384-- From danw@gnome.org Tue Sep 21 12:26:43 2010 Return-Path: X-Original-To: libsoup-list@gnome.org Delivered-To: libsoup-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 2E4E2750416 for ; Tue, 21 Sep 2010 12:26:43 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=2 tests=[BAYES_00=-1.9] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p6MKVXFuxG4Z for ; Tue, 21 Sep 2010 12:26:41 +0000 (UTC) Received: from mysterion.org (mysterion.org [69.25.196.35]) by menubar.gnome.org (Postfix) with ESMTP id DC7E675031E for ; Tue, 21 Sep 2010 12:26:32 +0000 (UTC) Received: from desktop.home.mysterion.org (c-76-97-71-164.hsd1.ga.comcast.net [76.97.71.164]) by mysterion.org (Postfix) with ESMTPA id DA563802AE; Tue, 21 Sep 2010 08:26:29 -0400 (EDT) Message-ID: <4C98A475.7010909@gnome.org> Date: Tue, 21 Sep 2010 08:26:29 -0400 From: Dan Winship User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Thunderbird/3.1.1 MIME-Version: 1.0 To: Rune Saetre Subject: Re: Disconnecting clients from SoupServer References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: libsoup-list@gnome.org X-BeenThere: libsoup-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "discussion of libsoup, an HTTP library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2010 12:26:43 -0000 On 09/20/2010 07:46 PM, Rune Saetre wrote: > Is it safe calling soup_socket_disconnect() from a different thread than > the one running GMainLoop? No, SoupServer isn't thread-safe. You'd have to add an idle handler to the server's main context, and call soup_socket_disconnect() from there. (And if that doesn't work, then file a bug.) -- Dan From rune.saetre@aptomar.com Tue Sep 21 13:06:03 2010 Return-Path: X-Original-To: libsoup-list@gnome.org Delivered-To: libsoup-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 03C26750DBF for ; Tue, 21 Sep 2010 13:06:03 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.918 X-Spam-Level: X-Spam-Status: No, score=-0.918 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RDNS_DYNAMIC=0.982] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9ALjFU+Nd7xG for ; Tue, 21 Sep 2010 13:06:00 +0000 (UTC) Received: from mail.aptomar.com (84-16-211.226.3p.ntebredband.no [84.16.211.226]) by menubar.gnome.org (Postfix) with ESMTP id AAB9A750239 for ; Tue, 21 Sep 2010 13:05:52 +0000 (UTC) Received: from 84-16-211.227.3p.ntebredband.no ([84.16.211.227]:35631 helo=mail.aptomar.com) by mail.aptomar.com with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Oy2eD-0001oa-0Z; Tue, 21 Sep 2010 15:12:37 +0200 Received: from localhost ([::ffff:127.0.0.1]) by mail.aptomar.com with ESMTP (TLS encrypted); Tue, 21 Sep 2010 15:05:47 +0200 Date: Tue, 21 Sep 2010 15:05:47 +0200 (CEST) From: Rune Saetre X-X-Sender: rst@pingle.local.rsnet To: libsoup-list@gnome.org In-Reply-To: <4C98A475.7010909@gnome.org> Message-ID: References: <4C98A475.7010909@gnome.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="279707905-923614221-1285072893=:4384" Content-ID: X-SA-Exim-Connect-IP: 84.16.211.227 X-SA-Exim-Mail-From: rune.saetre@aptomar.com Subject: Re: Disconnecting clients from SoupServer X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:20:07 +0000) X-SA-Exim-Scanned: Yes (on mail.aptomar.com) Cc: Rune Saetre X-BeenThere: libsoup-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "discussion of libsoup, an HTTP library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2010 13:06:03 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --279707905-923614221-1285072893=:4384 Content-Type: TEXT/PLAIN; CHARSET=iso-8859-1; FORMAT=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: Hi Thanks, that is what I guessed, but it is nice having it confirmed. But can you verify that calling soup_socket_disconnect() from the right=20 place should work well for disconnecting non-responsive clients? And will everything be disconnected and cleaned up after=20 soup_socket_disconnect() has returned? Or will this emit signals that are= =20 handled later? Is it safe to call soup_socket_disconnect() from glib signal handlers,=20 e.g. from the SoupMessage::wrote-body-data or SoupSocket::writable=20 signals? Do I risk infinite loops or other ugly things by doing that? I have been using a GAsyncQueue to trigger execution in the GMainLoop.=20 That works well for soup_message_body_append(). It did fail badly for=20 soup_socket_disconnect(), but I assumed that everything was cleaned up=20 after it returned, and did not expect any signals emitted for the=20 SoupMessage afterwards. That might have been the cause of the problems. Regards Rune S=E6tre On Tue, 21 Sep 2010, Dan Winship wrote: > On 09/20/2010 07:46 PM, Rune Saetre wrote: >> Is it safe calling soup_socket_disconnect() from a different thread than >> the one running GMainLoop? > > No, SoupServer isn't thread-safe. You'd have to add an idle handler to > the server's main context, and call soup_socket_disconnect() from there. > > (And if that doesn't work, then file a bug.) > > -- Dan > _______________________________________________ > libsoup-list mailing list > libsoup-list@gnome.org > http://mail.gnome.org/mailman/listinfo/libsoup-list > --279707905-923614221-1285072893=:4384-- From danw@gnome.org Tue Sep 21 17:32:19 2010 Return-Path: X-Original-To: libsoup-list@gnome.org Delivered-To: libsoup-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id AFD29750DA3 for ; Tue, 21 Sep 2010 17:32:19 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=2 tests=[BAYES_00=-1.9] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MrpHSFRR6NN2 for ; Tue, 21 Sep 2010 17:32:17 +0000 (UTC) Received: from mysterion.org (mysterion.org [69.25.196.35]) by menubar.gnome.org (Postfix) with ESMTP id 2492F750401 for ; Tue, 21 Sep 2010 17:32:08 +0000 (UTC) Received: from desktop.home.mysterion.org (c-76-97-71-164.hsd1.ga.comcast.net [76.97.71.164]) by mysterion.org (Postfix) with ESMTPA id 6CA2E802AE; Tue, 21 Sep 2010 13:32:06 -0400 (EDT) Message-ID: <4C98EC16.5010700@gnome.org> Date: Tue, 21 Sep 2010 13:32:06 -0400 From: Dan Winship User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Thunderbird/3.1.1 MIME-Version: 1.0 To: Rune Saetre Subject: Re: Disconnecting clients from SoupServer References: <4C98A475.7010909@gnome.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: libsoup-list@gnome.org X-BeenThere: libsoup-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "discussion of libsoup, an HTTP library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2010 17:32:20 -0000 On 09/21/2010 09:05 AM, Rune Saetre wrote: > But can you verify that calling soup_socket_disconnect() from the right > place should work well for disconnecting non-responsive clients? It's *supposed to*. I don't know that anyone is actually doing that, so it's possible that maybe it doesn't work... > And will everything be disconnected and cleaned up after > soup_socket_disconnect() has returned? Or will this emit signals that > are handled later? It could probably go either way. Cancellation in libsoup is unfortunately a little messy like that. > Is it safe to call soup_socket_disconnect() from glib signal handlers, > e.g. from the SoupMessage::wrote-body-data or SoupSocket::writable > signals? Do I risk infinite loops or other ugly things by doing that? Hm... it's probably safe to do it from a SoupMessage handler, yes. -- Dan