Author: cmailleux
Date: Mon Jul 9 11:58:19 2007
New Revision: 401
URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D401&repname=
=3Desi_server
Log:
Correctly calculate the size in bytes of the invalidation message
Modified:
trunk/src/net/sf/j2ep/factories/ResponseHandlerFactory.java
trunk/src/org/jahia/esi/invalidation/services/Invalidator.java
Modified: trunk/src/net/sf/j2ep/factories/ResponseHandlerFactory.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/src/net/sf/j2ep=
/factories/ResponseHandlerFactory.java&rev=3D401&repname=3Desi_server
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/src/net/sf/j2ep/factories/ResponseHandlerFactory.java (original)
+++ trunk/src/net/sf/j2ep/factories/ResponseHandlerFactory.java Mon Jul 9 =
11:58:19 2007
@@ -57,29 +57,32 @@
* @throws MethodNotAllowedException If no method could be choose this=
exception is thrown
*/
public static ResponseHandler createResponseHandler(HttpMethod method,=
RequestHandler reqHandler) throws MethodNotAllowedException {
+ final String name =3D method.getName();
if (!AllowedMethodHandler.methodAllowed(method)) {
- throw new MethodNotAllowedException("The method " + method.get=
Name() + " is not in the AllowedHeaderHandler's list of allowed methods.", =
AllowedMethodHandler.getAllowHeader());
+ throw new MethodNotAllowedException("The method " +
+ name + " is not in the All=
owedHeaderHandler's list of allowed methods.", AllowedMethodHandler.getAllo=
wHeader());
}
=
ResponseHandler handler =3D null;
- if (method.getName().equals("OPTIONS")) {
+ if (name.equals("OPTIONS")) {
handler =3D new OptionsResponseHandler((OptionsMethod) method);
- } else if (method.getName().equals("GET")) {
+ } else if (name.equals("GET")) {
handler =3D new GetResponseHandler((GetMethod) method);
- } else if (method.getName().equals("HEAD")) {
+ } else if (name.equals("HEAD")) {
handler =3D new HeadResponseHandler((HeadMethod) method);
- } else if (method.getName().equals("POST")) {
+ } else if (name.equals("POST")) {
handler =3D new PostResponseHandler((PostMethod) method);
- } else if (method.getName().equals("PUT")) {
+ } else if (name.equals("PUT")) {
handler =3D new PutResponseHandler((PutMethod) method);
- } else if (method.getName().equals("DELETE")) {
+ } else if (name.equals("DELETE")) {
handler =3D new DeleteResponseHandler((DeleteMethod) method);
- } else if (method.getName().equals("TRACE")) {
+ } else if (name.equals("TRACE")) {
handler =3D new TraceResponseHandler((TraceMethod) method);
- } else if (handledWebDAVMethods.indexOf(method.getName().toUpperCa=
se())!=3D-1) {
+ } else if (handledWebDAVMethods.indexOf(name.toUpperCase())!=3D-1)=
{
handler =3D new WebDavResponseHandler((WebDavMethod) method);
} else {
- throw new MethodNotAllowedException("The method " + method.get=
Name() + " was allowed by the AllowedMethodHandler, not by the factory.", h=
andledMethods+handledWebDAVMethods);
+ throw new MethodNotAllowedException("The method " +
+ name + " was allowed by th=
e AllowedMethodHandler, not by the factory.", handledMethods+handledWebDAVM=
ethods);
}
// handler.setRequestHandler(reqHandler);
=
Modified: trunk/src/org/jahia/esi/invalidation/services/Invalidator.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/src/org/jahia/e=
si/invalidation/services/Invalidator.java&rev=3D401&repname=3Desi_server
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/src/org/jahia/esi/invalidation/services/Invalidator.java (origina=
l)
+++ trunk/src/org/jahia/esi/invalidation/services/Invalidator.java Mon Jul =
9 11:58:19 2007
@@ -136,7 +136,7 @@
//if (log.isDebugEnabled()) log.debug("Accepted connection fro=
m :" + from + " on port:"+s.getInvalidationPort());
//if (log.isDebugEnabled()) log.debug("on local server :" + s.=
getLocalAddress()+":"+s.getLocalPort());
=
- is =3D new BufferedReader(new InputStreamReader( i ));
+ is =3D new BufferedReader(new InputStreamReader( i,"UTF-8" ));
=
String buf;
=
_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list