[thredds] Bug report on Content-Length for HTTP Head Request

Hi All,

In thredds.servlet.ServletUtil.java, line 607:
  res.addHeader("Content-Length", Long.toString(contentLength));

The above line is not setting up "Content-Length" correctly for HTTP Head 
Request in Tomcat.
As the current implementation in Tomcat, using doGet method to handle HTTP Head 
request will be resulted in a NoBodyResponse to be returned.
The NoBodyResponse only accepts response.setContentLength method, otherwise, it 
always sets the Content-Length to 0.

Suggested fix is to override doHead() in thredds.servlet.FileServerServlet.java 
 and make it as a delegator to doGet() method.


Ming Fu
Software Engineer

Tasmanian Partnership for Advanced Computing
University of Tasmania

  • 2011 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: