From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id A8EC1420F9 for ; Thu, 16 Dec 2021 11:03:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2C8EE68AEAD; Thu, 16 Dec 2021 13:03:02 +0200 (EET) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70113.outbound.protection.outlook.com [40.107.7.113]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C5CEF68A5F0 for ; Thu, 16 Dec 2021 13:02:55 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gmZ5OHAyzHU90OPV0WboAuiN1zBgPm5S6Lu9ZdCJXQfV9ozlMKjdhPHTLqODzP5O/yYa+VW309O4d8yV5oJShUbhgkkM0tv5Qz+u+pziGGbEgTjUpI2XsBgu4EBQ9HD6pSWv1PdJ4onXTyQghgY1zyjvUs6NMz78FwXqaVdhQ38Nph6NCUlHeNdcATtNWzWfIETKzlGc1v9vgAVHua0osTuXjqoygR+PxCySvMufgga9BwMbVOXD03whVETo5jK07ghpU19xXtp1lIezU76RHBxKrvKFpgHnx9czK3WHwn7rJtyMPcktzwxaAEqF37+mlbs2wrodAFha/aPj2C/ifg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xfCbc7mcY5TsltUzwCl1ff2dBct0dVz4B4GG0/lOFtQ=; b=BanS9usmLQzTXJUo0npAlekQv0INparX9fYX3UiHe+tv9KeXmEjVGX4yJrFjuRQiiDKJEv4ciIJsSu2LBmu88zL36nwA7uv3eXmFdROZxfM1O5xDEwbPwmLAoVyFBot/GpbVB0cN346Uqf4MnkcYnxSfPiLTuSkDo+0I9nDbH11UV09cXHfG3CoFXp7DuZ6f5J63QU2Xlmjt8ZfO9wZwmREqwXmyQHIn6Kx/rFBOlvjboaIRZcMBX2qLim2Eb2fiTJ2niu2HnBwOPHAOeCfQSv4t43dHX0g9qJtv30RrGqzeba4sTPvNepYvZTiRcYiHcvAMYodf+FWVby0EKEn9jA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kaltura.com; dmarc=pass action=none header.from=kaltura.com; dkim=pass header.d=kaltura.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kaltura.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xfCbc7mcY5TsltUzwCl1ff2dBct0dVz4B4GG0/lOFtQ=; b=PF4vu5uXSAdMbFQ4HBtEDJxGSWCkzNa6YBMlfNWhWPGsoCJ+yf1IfyA6RhwlJclIQyrDvqwi4AzEryzfCx2+5fuMImTy12fPMl+YMZt5pyW5o3pfrWnaCrqIGbhQo8hcsj0VFGxlWjEXb2xkxqkd1MaIOcFBDsc8FB0hQZ5zUh9FOQmfbrNl83+rC5kARVkASTKfVuu1miB4hUzr0MMpgMi3eDLjz/qm/T7NJpXnFtqowWLNjdd91J+zTZpMQpObfXOmRkfPVPrn6gpCZiU3N1F35B7PrlodGWMZVxBs+nOD2hrwC0D5C7nyTPjf/MEF1Jym+e6ycwZLAPsb9WRE8Q== Received: from AM9PR04MB8922.eurprd04.prod.outlook.com (2603:10a6:20b:409::19) by AS4PR04MB9484.eurprd04.prod.outlook.com (2603:10a6:20b:4ed::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.14; Thu, 16 Dec 2021 11:02:53 +0000 Received: from AM9PR04MB8922.eurprd04.prod.outlook.com ([fe80::f4c1:34a1:80df:6ed4]) by AM9PR04MB8922.eurprd04.prod.outlook.com ([fe80::f4c1:34a1:80df:6ed4%3]) with mapi id 15.20.4778.018; Thu, 16 Dec 2021 11:02:53 +0000 From: Eran Kornblau To: FFmpeg development discussions and patches Thread-Topic: [FFmpeg-devel] [PATCH] http: make caching of redirect url optional Thread-Index: AdfP4WZCgn3/60JXQyCwlrEQRe0pdQEAw2QAACDWFoAB+R1I8AFfPxPQAWC6vLABe3ihAAFMj0Dw Date: Thu, 16 Dec 2021 11:02:53 +0000 Message-ID: References: <4a6752f0-c0fe-56d8-eb8b-a8413bc825c@passwd.hu> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=kaltura.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2c3136bc-9e7c-4540-78de-08d9c0839be4 x-ms-traffictypediagnostic: AS4PR04MB9484:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IlqsmNCP+L9FRyQO++P2FFC38sxm5V4S1TMYiDm74dUoImyk9l/p8cRX0rJOwLNzUSwAb07y3UbTGhY6/8OczkEYOyPdo8IPajck3Sqw4EWPyS91j4pDKImAIbCoa2kv6lwL63pBue9FCKz3fI3kZoHa4bSND/qIf4hYZOHQA4dRclzcVEBLQXZ1+uHdAd7yqml5xF9rcMtWh96GZrFHkNQTQDU+uo0J9l2hqxQDx/gbFBUY1J+RyeWozRxXTno9bYoik0LlvSGFZfbaNgZURwe6/v0HxofZlJRnww/Hc2zAQgXLji4t0c+7yTrDgDCK+1vx9dWg2wAE5xB5T8DCCflqpL0XN3sFJ/Mfa7v9L9F/tB7BGlO20o22nf3XjsJpNkYcVoYqFyT+wwAFNQ3PlukrcGNPRoh1FWUFlAb78nHcdf9yef4n6U8E7Hgj3Q+chG0RD2hYsC+ch9o0WaAl5BiYjarHey+yV6rxXXAL4TnmqNL+lEO4Gk1vRJ/OLrbwHgygRseR9f2JuERJeZJBuqB6NsslGFtMMU6X3cTHYvoxFSYI8j2J/4CTFyQ6TMte6ZkSB6jAb3jPvcfz1utOneSHEf6hOgRbqohSMfGcOZFV0jaW/9aYS7LYy9HjnSrLKHcC349eWO1G+3RwhpKbjJ4XCfzbhuzIvHZx4kgMxF5H2iWVDULNgDBRy+zfai9090xRe2lTYWTe/A4QDAEQaA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM9PR04MB8922.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(64756008)(6506007)(5660300002)(122000001)(7696005)(186003)(38100700002)(508600001)(66476007)(8936002)(6916009)(71200400001)(76116006)(66574015)(316002)(2906002)(52536014)(86362001)(83380400001)(44832011)(66446008)(8676002)(53546011)(33656002)(66946007)(26005)(786003)(66556008)(38070700005)(55016003)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?K2Rad3pwYlUzbXhLN1Nvb01tVmlMTTZaL0tQN2xHY2NwendqYTBXYzJCY1l1?= =?utf-8?B?VG5LOENPYVMrSkUzSUNiMjNpWnRKZFA1SnE5enducmlaLzNGQ3cwSmZlUlo2?= =?utf-8?B?S09EdXhuL0daNE50N1RkRmxGWkhtMXBpZlZjNUlnUDMzbDIyTy9xUDBmd3dz?= =?utf-8?B?aGlzOFhQU213QlZicUJENlQ5bWpzWVpoVk0wSnZTS2dyWXBTak11KzlQL3BI?= =?utf-8?B?RnRJcnVBbFh0dDQydWFZNTB0VlhsTjE0bGllMVZ6ZkRoOXQ0R2RWdHFaYlhL?= =?utf-8?B?eFFjU2FpZkV6czBCUUhY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k00MWFt?= =?utf-8?B?dWxZNDc5bStXNEgvVTRZckVNdzU1VGx2VCtpZ3AxeWpzMXRXb3Jmak1Rb29w?= =?utf-8?B?TmdSM3hYeStON3hlQjYyVzRmQXNqWXcza2lOSjhLdTlqdkN4SUpNRDlGaTZ2?= =?utf-8?B?c3VXVTRVTnNvei9ZaXAxWC9rUmdRPT0=?= MIME-Version: 1.0 X-OriginatorOrg: kaltura.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8922.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c3136bc-9e7c-4540-78de-08d9c0839be4 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2021 11:02:53.7878 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0c503748-de3f-4e25-97e2-6819d53a42b6 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: L0TOK2D/4eU0KmQY8ppkCE5zN6+9fjckquk4wq70k1MgIBkEsPQI4vbGOw+h9uH0CBbXM0tuC18SVg3doB4RmjnUzeqTEooW1G6Fe/2D7s0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9484 Subject: Re: [FFmpeg-devel] [PATCH] http: make caching of redirect url optional X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: > > -----Original Message----- > From: Eran Kornblau > Sent: Thursday, 9 December 2021 22:24 > To: FFmpeg development discussions and patches > Subject: RE: [FFmpeg-devel] [PATCH] http: make caching of redirect url optional > > > > > -----Original Message----- > > From: Eran Kornblau > > Sent: Thursday, 2 December 2021 9:16 > > To: FFmpeg development discussions and patches > > Subject: RE: [FFmpeg-devel] [PATCH] http: make caching of redirect url optional > > > > Another ping... resending with the original patch > > > > Eran > > > > -----Original Message----- > > From: Eran Kornblau > > Sent: Thursday, 25 November 2021 8:55 > > To: FFmpeg development discussions and patches > > Subject: RE: [FFmpeg-devel] [PATCH] http: make caching of redirect url optional > > > > > > > > > > > > On Tue, 2 Nov 2021, Eran Kornblau wrote: > > > > > > > > > > > Hi all, > > > > > > > > > > > > The attached patch makes the default behavior of caching HTTP redirects optional. > > > > > > > > > > Is caching a redirected URL allowed per the HTTP spec? If not, then no caching should take place, or the caching should be optional, and not the default. > > > > > > > > > From a quick search on this, it seems that browsers by default cache 301 redirects, while 302/307 are not cached by default. > > > > However, in both cases, the browser is expected to honor any Cache-Control/Expires headers. > > > > > > > > Changing the implementation to imitate the behavior of a browser would be more complex, since currently there is only a single "slot" in the cache. > > > > For example, if we have a chain of redirects 307->301->200, and we want to cache the 301 but not the 307, we can't really do it. > > > > Solving this one would require a more complex data structure, and if we add expiration/TTL to the mix, it becomes even more complex... > > > > > > > > Assuming we don't want to add a large chunk of code to handle this, the options I see are - 1. A simple boolean option - as proposed in this patch. We can argue about what the default should be :) but it felt safer to me to have the default behavior as it was before. > > > > 2. Cache only 301's directly linked to the original URL - e.g. if we have 301->301->307->301->200, we cache only the first 2 redirects. > > > > My concern here is that this would break/slow down applications that rely on the existing behavior of caching any redirect. > > > > > > > > > > Hi, > > > > > > Looking for some guidance how to proceed with this... > > > > > > On one side, we have the minimal alternative of adding an option to the http module (as in the patch I submitted), on the other side we have the alternative of fully imitating the behavior of a browser - respect cache-control/expires, and if these headers are missing, default according to status code (301/302/307). > > > We can also go with something in between - e.g., we can cache 301's that are returned directly from the original url, and avoid caching any 302/307, as well as 301's that come after a 302/307. > > > > > > > Ping... > > > > Any objection to merge the patch that adds an option to disable the caching of redirect? > > > > Thanks! > > > > Eran > > > > > Thank you > > > > > > Eran > > > > > > > Any thoughts/suggestions are welcome, > > > > > > > > Thank you, > > > > > > > > Eran > > > > > > > > > Thanks, > > > > > Marton > > > > > > > > > > > > > > > Trying again... we're stuck on this one... > > To recap - I want to somehow prevent ffmpeg from caching HTTP redirects. > The patch I submitted implements it using a new option, but I'm open to other suggestions - doing it based on HTTP status code etc. > Just need some guidance on which direction to take here, so that some solution for this could be merged. > > Thank you, > > Eran > > Anyone? Eran _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".