tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Is empty Content Type of Request allowed in Tomcat?
Date Mon, 29 Aug 2011 11:34:45 GMT
Isaac Li wrote:
> 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: ''

That is clearly incorrect, so Tomcat would be right to complain.

> 
> 
> I thought this error is reported by tomcat, since it has not running into my
> code.
> 
> 
...
> 
> So is it possible to modify tomcat setting to allow empty Content Type of
> request? 

Why should Tomcat be modifiedt to accept incorrect HTTP requests ?
Tomcat is a HTTP server, so it must follow the HTTP specs.  And the HTTP specs probably 
say that if a request header is clearly incorrect (as this one is), the server MUST 
respond with a 400 error.

or I should try other ways

Yes, fix the client.
(Or report the problem on the Cyberduck mailing list).

  (I heard someone said adding some
> filters?)

Would probably not help, as the error may be generated before the filter is ever called.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message