317906 OPTIONS correctly handles TRACE
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2056 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
1fd3ff55c5
commit
3b5c2dd465
|
@ -9,6 +9,7 @@ jetty-7.1.5-SNAPSHOT
|
|||
+ 316976 removed quotes of JAVA_OPTIONS in jetty.sh
|
||||
+ 317019 Date HTTP header not sent for HTTP/1.0 requests
|
||||
+ 317759 Allow roles and constraints to be added after init
|
||||
+ 317906 OPTIONS correctly handles TRACE
|
||||
+ JETTY-1237 Save local/remote address to be available after close
|
||||
|
||||
jetty-7.1.4.v20100610
|
||||
|
|
|
@ -462,7 +462,6 @@ public class HttpConnection implements Connection
|
|||
|
||||
_parser.reset(true);
|
||||
_endp.close();
|
||||
throw e;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
@ -16,6 +16,7 @@ package org.eclipse.jetty.servlet;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.Enumeration;
|
||||
|
@ -566,6 +567,14 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory
|
|||
resp.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
@Override
|
||||
protected void doOptions(HttpServletRequest req, HttpServletResponse resp)
|
||||
throws ServletException, IOException
|
||||
{
|
||||
resp.setHeader("Allow", "GET,HEAD,POST,OPTIONS");
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* Finds a matching welcome file for the supplied {@link Resource}. This will be the first entry in the list of
|
||||
|
|
|
@ -60,6 +60,7 @@ public class PutFilter implements Filter
|
|||
|
||||
Set<String> _operations = new HashSet<String>();
|
||||
protected ConcurrentMap<String,String> _hidden = new ConcurrentHashMap<String, String>();
|
||||
protected String _options;
|
||||
|
||||
protected ServletContext _context;
|
||||
protected String _baseURI;
|
||||
|
@ -87,10 +88,12 @@ public class PutFilter implements Filter
|
|||
|
||||
_operations.add(__OPTIONS);
|
||||
_operations.add(__PUT);
|
||||
_options="GET,HEAD,POST,OPTIONS,PUT";
|
||||
if (_delAllowed)
|
||||
{
|
||||
_operations.add(__DELETE);
|
||||
_operations.add(__MOVE);
|
||||
_options+=",DELETE";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -284,15 +287,13 @@ public class PutFilter implements Filter
|
|||
|
||||
response.setStatus(HttpServletResponse.SC_NO_CONTENT);
|
||||
response.flushBuffer();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
public void handleOptions(HttpServletRequest request, HttpServletResponse response) throws IOException
|
||||
{
|
||||
// TODO implement
|
||||
throw new UnsupportedOperationException("Not Implemented");
|
||||
// TODO filter real options and add PUT & DELETE
|
||||
response.setHeader("Allow", _options);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
|
|
@ -61,6 +61,10 @@ System Properties:
|
|||
Ignored exceptions are logged, independent of DEBUG settings
|
||||
(default: false)
|
||||
|
||||
org.eclipse.jetty.util.log.SOURCE=[boolean]
|
||||
The source location of logs is logged in the stderr Logger.
|
||||
(default: false)
|
||||
|
||||
com.sun.management.jmxremote
|
||||
Enable remote JMX management in Sun JVMS.
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ public class StdErrLog implements Logger
|
|||
if (!_debug)
|
||||
return;
|
||||
StringBuilder buffer = new StringBuilder(64);
|
||||
format(buffer, ":INFO:", msg, thrown);
|
||||
format(buffer, ":DBUG:", msg, thrown);
|
||||
System.err.println(buffer);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ import org.eclipse.jetty.server.handler.RequestLogHandler;
|
|||
import org.eclipse.jetty.server.nio.SelectChannelConnector;
|
||||
import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.StdErrLog;
|
||||
import org.eclipse.jetty.util.thread.QueuedThreadPool;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
|
||||
|
@ -36,6 +37,9 @@ public class TestServer
|
|||
{
|
||||
public static void main(String[] args) throws Exception
|
||||
{
|
||||
Log.getLog().setDebugEnabled(false);
|
||||
((StdErrLog)Log.getLog()).setSource(false);
|
||||
|
||||
String jetty_root = "..";
|
||||
|
||||
Server server = new Server();
|
||||
|
|
Loading…
Reference in New Issue