[Webpush] Some comments on webpush server responses

Ben Last <benlast@mobify.com> Mon, 15 August 2016 16:51 UTC

Return-Path: <benlast@mobify.com>
X-Original-To: webpush@ietfa.amsl.com
Delivered-To: webpush@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D7D8B12D63B for <webpush@ietfa.amsl.com>; Mon, 15 Aug 2016 09:51:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.247
X-Spam-Level:
X-Spam-Status: No, score=-3.247 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-1.247, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=mobify.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Fm_5EzuOdpA1 for <webpush@ietfa.amsl.com>; Mon, 15 Aug 2016 09:51:31 -0700 (PDT)
Received: from smtp.mobify.com (smtp.mobify.com [162.222.122.205]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A7AFD12D67F for <webpush@ietf.org>; Mon, 15 Aug 2016 09:50:13 -0700 (PDT)
Received: from mail-it0-f69.google.com (mail-it0-f69.google.com [209.85.214.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.mobify.com (Postfix) with ESMTPS id 3E27D30065F for <webpush@ietf.org>; Mon, 15 Aug 2016 09:50:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mobify.com; s=smtp; t=1471279813; bh=6gb+eZ2y5u8/DE28xbAWPIo6L0GuV/lzhbBtd/tRdfo=; h=From:Date:Subject:To; b=HepR6xMF1YgXMtbRc5rGUFDzJ2lZNnXUevozE9w9yyL+xFxs85jlZ4SqwuvU0fGfZ otBMOO/a6lEh71EhYo9Iub7AeM63wyNNt15tWC5VzDk9AWdZXJCJvoCCcUeCfD2wQv oG99ByPQObrLFUMcZyfDFgzCLR8p2v8C8EmjBJYg=
Received: by mail-it0-f69.google.com with SMTP id j124so182536488ith.1 for <webpush@ietf.org>; Mon, 15 Aug 2016 09:50:13 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ggqy9f9L6vxM3b4GpeCeQdDijhomxYYWxJIJxD8k9t0=; b=LuDseghg2L6hGgHcoob2Pj/BJWhnEhecZkU+NZaLNKR8QXlBEyVV/FDotSG4zHw35i Nu3skhkNSr0J3t6zRfW91FsfKfYsS2z2kYpDGWCzywhLot+dD9beJf9kHfL4Rfm+nwKA XZiAt336sxyhW/5PqAqGki9WlXEvNDiYpzoFgPfESL55MCQTHxp+OHPi3QW/P40UXDKX VkYnijAZN2LmJ9dXEx4jRX74WJsJoj1ptfkrCIBwjcxLHaWzeoB27ruqnxpVjTdEZPqx fVJ1zCFO+MG2hZUkPBGAx33lzrbxifHXJv+5DY3p4RTHMRYHu8D5muCPPVG/jUHmwmG+ 2fuA==
X-Gm-Message-State: AEkooutEt9IxV4M3g+DO2v3nU2Y9QvJiq19b6OoxKx5TV8TN7VnJn0ga5qMBZVfmxm7yNMlbF55QnBaFai7TDpPt8lY+dMYlMBiLKsm6oculN6tmSARPkf1Mu9dkJFCoNQEOjvjPkN2vJXLLIxSsIMRV
X-Received: by 10.36.76.16 with SMTP id a16mr15140546itb.77.1471279812503; Mon, 15 Aug 2016 09:50:12 -0700 (PDT)
X-Received: by 10.36.76.16 with SMTP id a16mr15140522itb.77.1471279812313; Mon, 15 Aug 2016 09:50:12 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.166.134 with HTTP; Mon, 15 Aug 2016 09:50:11 -0700 (PDT)
From: Ben Last <benlast@mobify.com>
Date: Mon, 15 Aug 2016 09:50:11 -0700
Message-ID: <CAM5PDDwdPnM1U-dx6Caqf-Uv3yfTu+QxkKWkA90eCO+Mu_=sgQ@mail.gmail.com>
To: webpush@ietf.org
Content-Type: multipart/alternative; boundary=001a11447dc89430ea053a1f064a
Archived-At: <https://mailarchive.ietf.org/arch/msg/webpush/eMSnril7Ob6r8BcLdKGw14A7r70>
Subject: [Webpush] Some comments on webpush server responses
X-BeenThere: webpush@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Discussion of potential IETF work on a web push protocol <webpush.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/webpush>, <mailto:webpush-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/webpush/>
List-Post: <mailto:webpush@ietf.org>
List-Help: <mailto:webpush-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/webpush>, <mailto:webpush-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 15 Aug 2016 16:51:33 -0000

Hi all

Apologies if I violate IETF etiquette here; I have some comments on
https://tools.ietf.org/html/draft-ietf-webpush-protocol-08#section-7.3

In our push service, we're often coming across the problem of
distinguishing *why* we get a 404 (or 410 for Mozilla's autopush) reponse
when sending to an existing push subscription. We know of the following
reasons why a push server might respond with a 404/410 (there may of course
be others):

   1. The push subscription endpoint to which a POST was made is invalid -
   it does not refer to a known subscription
   2. The push subscription endpoint to which a POST was made is *no
longer* valid
   - it refers to a subscription that has been removed because the end-user
   removed notification permission
   3. The push subscription endpoint to which a POST was made is *no
longer* valid,
   but the subscription should be recreated (i.e., it has expired)

Section 7.3 appears to refer to the last of these, but an application
server has no information that allows it to distinguish between the cases.

It's important for us to be able to distinguish because in case 1 we should
remove the subscription, in case 2 we should mark it as blocked (so that
website code does not invite the user to resubscribe) and in case 3 we
should mark the subscription so that a service worker or website code
resubscribes.

Regards
Ben

—

Ben Last, Senior Full Stack Engineer

[image: Mobify]

Mobile Customer Engagement

mobify.com
<http://www.mobify.com/?utm_source=Email&utm_medium=Email&utm_campaign=email-signature>
|
M 1.604.358.0155 | @benlast <https://twitter.com/@benlast>

Mobify is ranked as a leader in mobile customer engagement. View the Report!
<http://resources.mobify.com/forrester-wave-report-2016.html?utm_source=Email&utm_medium=Email&utm_campaign=email-signature>