From users-return-265163-archive-asf-public=cust-asf.ponee.io@tomcat.apache.org Thu Jul 26 13:46:39 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A5030180621 for ; Thu, 26 Jul 2018 13:46:38 +0200 (CEST) Received: (qmail 51102 invoked by uid 500); 26 Jul 2018 11:46:37 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 51091 invoked by uid 99); 26 Jul 2018 11:46:36 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jul 2018 11:46:36 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 81EC21A12F5 for ; Thu, 26 Jul 2018 11:46:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.889 X-Spam-Level: * X-Spam-Status: No, score=1.889 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id pwKU9racmXRS for ; Thu, 26 Jul 2018 11:46:35 +0000 (UTC) Received: from mail-vk0-f44.google.com (mail-vk0-f44.google.com [209.85.213.44]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id B89795F48A for ; Thu, 26 Jul 2018 11:46:34 +0000 (UTC) Received: by mail-vk0-f44.google.com with SMTP id y9-v6so634353vky.3 for ; Thu, 26 Jul 2018 04:46:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=fLVRnzSkHpLU1/15M+sa/xbVdHo2m9sGyocxy+oNrko=; b=iTyYQHPln5lk6d0ZRorW2TxNZs2FrsmoYh4OOhbid3Q6PtxA38EuOrWOFk3d0B+31Q yRVlhhLpkrN1OqInvuj1oh3WGy2LNzCRUGiYLqJvdQfGBO0JXVMdEauVXkJnY5+SOu9X UtFPpiR5IDdGjOu5HGiNPmw1sPZFtcd/hL+9v5dIg/qlzfJ8F9Ub3nsPhhRQJbvv5y8m HtUb5yQz3xNCh4GjCHXctZpOWQ++e/GvOFbcYXcnFuSDwHiUjsvCFOJQ9EUOfY6F41hq 3etBS+9amRqy+eFboaCHIcBiD1R0wTCiaWE6z3h2JVVhKdEHAdUHAP9d8brMf4KzBm8e sIWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fLVRnzSkHpLU1/15M+sa/xbVdHo2m9sGyocxy+oNrko=; b=cDRxnRG/K2c93NVSpENmfX3y6GPXSgS+mY0CKNChL42tfzhXvlYAl3HTF94f6ccrth r99KDqdpQq1WiqMj7aab4JY9jQkpaPE8+YIdDHQUbG7U1FDc2zl6RimOp42qt7DkjHyy hkkLLbKPV86B8L6kpdpSRNOLiCSoiUJfTk7ql4Y4P4H9VPeNYJYVWClXunWuSrV6bm2Y eoa6ZDEAPQMmuEDoftaReKiFmDH26F/Y8Pw7Pc4u1uB9aQ978Ejj0gp4INoKuyvaqEwf /cNgloi7SAB8Ky8eRrl514xdAZoLir24WHth4AIZCyMDCto5p0BhOfbg2zetX+ug5wz0 px2Q== X-Gm-Message-State: AOUpUlEi0YKY1DAgBZdt9nv1IpjMqknVGp+VG0xAuKaw4ZFCEJZ2aVm3 hA5alCS2VN81pincWeQlxjNcSftP59fDiIV0N7pfoc8r X-Google-Smtp-Source: AAOMgpf5ylLR69yeXTrX7Y+z6mzMxRIpRi9QaZMhmhnSanpSYM7dIeGSX4usX2FXb7Eg0+IatB44T2exjXFWvBu66cc= X-Received: by 2002:a1f:3544:: with SMTP id c65-v6mr923730vka.124.1532605587576; Thu, 26 Jul 2018 04:46:27 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:32c4:0:0:0:0:0 with HTTP; Thu, 26 Jul 2018 04:46:27 -0700 (PDT) From: Assia Djambazova Date: Thu, 26 Jul 2018 14:46:27 +0300 Message-ID: Subject: HttpServletResponse.sendError - missing message in error page To: users@tomcat.apache.org Content-Type: multipart/alternative; boundary="000000000000a0e9970571e58b0d" --000000000000a0e9970571e58b0d Content-Type: text/plain; charset="UTF-8" Hello, I noticed that when using HttpServletResponse.sendError in Tomcat 7.0.90 with string message the message is no longer shown as the response is displayed. I reproduce this with request to simple servlet: * public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "TEST ERROR MESSAGE"); }* The result in the browser is different: In Tomcat 7.0.90 HTTP Status 500 ? Internal Server Error In Tomcat 7.0.88 HTTP Status 500 - TEST ERROR MESSAGE I think that this change is the cause [1] However, this change looks incompatible with servlet spec and breaks our integration tests. It seems to me from the spec [2] that the message should be displayed: *The server defaults to creating the response to look like an HTML-formatted server error page containing the specified message, setting the content type to "text/html"* I use the ErrorReportValve and showReport is set to false. Reading [3] doesn't clarify if error message is part of the error report or not and if it should be displayed. Thanks, Assia [1] https://bz.apache.org/bugzilla/show_bug.cgi?id=60490 [2] https://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpServletResponse.html#sendError-int-java.lang.String- [3] https://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Error_Report_Valve --000000000000a0e9970571e58b0d--