Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0AEB87175 for ; Mon, 29 Aug 2011 08:11:52 +0000 (UTC) Received: (qmail 37733 invoked by uid 500); 29 Aug 2011 08:11:47 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 37290 invoked by uid 500); 29 Aug 2011 08:11:27 -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 37279 invoked by uid 99); 29 Aug 2011 08:11:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Aug 2011 08:11:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tingjun.li@gmail.com designates 209.85.161.45 as permitted sender) Received: from [209.85.161.45] (HELO mail-fx0-f45.google.com) (209.85.161.45) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Aug 2011 08:11:14 +0000 Received: by mail-fx0-f45.google.com with SMTP id b27so5484588fxb.18 for ; Mon, 29 Aug 2011 01:10:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=1bHChDoJOf7/IoJV9nWHx0i7lp2vkh+bOCPeJi0zovI=; b=kWmXwMJdsWMD4ArB7sZ5v9lgCZPgzwf/s01ag9X2IBoQaoEW+sYyDNE3CHcnfjGlFJ 4ZERM0qTXwqgSmdUA9r89ua0EegB8nn9vgDOAw3Vdh9PI9phZekkrOZmxUoGS/I7i/RV quAEPcDsjC8jLR61smN3F+i3pb/+lsUveLv1k= MIME-Version: 1.0 Received: by 10.223.61.148 with SMTP id t20mr6733334fah.125.1314605453887; Mon, 29 Aug 2011 01:10:53 -0700 (PDT) Received: by 10.223.89.135 with HTTP; Mon, 29 Aug 2011 01:10:53 -0700 (PDT) In-Reply-To: References: Date: Mon, 29 Aug 2011 16:10:53 +0800 Message-ID: Subject: Is empty Content Type of Request allowed in Tomcat? From: Isaac Li To: users@tomcat.apache.org Content-Type: multipart/alternative; boundary=001517475f3a19491c04aba06f17 --001517475f3a19491c04aba06f17 Content-Type: text/plain; charset=ISO-8859-1 Hello, I'm using Cyberduck as client to send request to my web server which using apache-tomcat-7.0.16 as web container. When Cyberduck sent a request with an empty Content Type, web server returned following errors: HTTP/1.1 400 Bad Request (text/plain) Bad Content-Type header value: '' I thought this error is reported by tomcat, since it has not running into my code. I've enabled Tomcat debug log, and have no clue, following are some catalina log: 2011-08-29 15:29:50,031 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG org.apache.catalina.startup.HostConfig- Checking context[/host-manager] reload resource D:\apache-tomcat-7.0.16\webapps\host-manager\WEB-INF\web.xml 2011-08-29 15:29:50,531 ["http-apr-80"-exec-5] DEBUG org.apache.catalina.connector.CoyoteAdapter- The variable [uriBC] has value [/] 2011-08-29 15:29:50,531 ["http-apr-80"-exec-5] DEBUG org.apache.catalina.connector.CoyoteAdapter- The variable [semicolon] has value [-1] 2011-08-29 15:29:50,531 ["http-apr-80"-exec-5] DEBUG org.apache.catalina.connector.CoyoteAdapter- The variable [enc] has value [ISO-8859-1] 2011-08-29 15:29:50,531 ["http-apr-80"-exec-5] DEBUG org.apache.catalina.authenticator.AuthenticatorBase- Security checking request GET / 2011-08-29 15:29:50,531 ["http-apr-80"-exec-5] DEBUG org.apache.catalina.realm.RealmBase- No applicable constraints defined 2011-08-29 15:29:50,531 ["http-apr-80"-exec-5] DEBUG org.apache.catalina.authenticator.AuthenticatorBase- Not subject to any constraint 2011-08-29 15:30:00,031 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG org.apache.catalina.startup.HostConfig- Checking context[] redeploy resource D:\apache-tomcat-7.0.16\webapps\ROOT So is it possible to modify tomcat setting to allow empty Content Type of request? or I should try other ways (I heard someone said adding some filters?) - and What's the detailed steps? Thanks --001517475f3a19491c04aba06f17--