DO NOT REPLY [Bug 47330] proposal : port of mod_remoteip in Tomcat as RemoteIpValve

2009-12-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47330

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 CC||b...@najdi.si

--- Comment #13 from Mark Thomas ma...@apache.org 2009-12-11 08:46:28 GMT ---
*** Bug 48378 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 47330] proposal : port of mod_remoteip in Tomcat as RemoteIpValve

2009-11-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47330

--- Comment #12 from Mark Thomas ma...@apache.org 2009-11-09 06:31:33 GMT ---
Patch applied. Many thanks.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 47330] proposal : port of mod_remoteip in Tomcat as RemoteIpValve

2009-11-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47330

--- Comment #11 from Cyrille Le Clerc cyrille.lecl...@pobox.com 2009-11-08 
15:50:42 UTC ---
Created an attachment (id=24505)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24505)
logging, naming and javadoc patch

Here is a patch of RemoteIpFilter with the following :
* fix NPE in log statement if protocolHeader has not been defined and the
servlet container does not support request.getHeader(null)
* fix mismatch between javadoc  and code for filter parameter name
allowedInternalProxies - internalProxies
* finish javadoc refactoring XForwardedFilter - RemoteIpFilter

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 47330] proposal : port of mod_remoteip in Tomcat as RemoteIpValve

2009-11-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47330

Cyrille Le Clerc cyrille.lecl...@pobox.com changed:

   What|Removed |Added

  Attachment #24505|logging, naming and javadoc |logging, naming and javadoc
description|patch   |patch of RemoteIpFilter

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 47330] proposal : port of mod_remoteip in Tomcat as RemoteIpValve

2009-11-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47330

--- Comment #9 from Mark Thomas ma...@apache.org 2009-11-05 12:35:50 GMT ---
I've applied the filter to trunk and proposed the valve for backport to 6.0.x
along with the required changes to Request

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 47330] proposal : port of mod_remoteip in Tomcat as RemoteIpValve

2009-11-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47330

Cyrille Le Clerc cyrille.lecl...@pobox.com changed:

   What|Removed |Added

  Attachment #24465|0   |1
is obsolete||

--- Comment #7 from Cyrille Le Clerc cyrille.lecl...@pobox.com 2009-11-04 
01:04:03 UTC ---
Created an attachment (id=24471)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24471)
Fixed Tomcat 7 patch with successful test case

Sorry for the time you lost. Here is the patch that includes the following
modified/added files : 
- valve.xml
- RemoteIpValveTest.java
- RemoteIpValve.java
- LocalStrings.properties
- mbeans-descriptors.xml

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 47330] proposal : port of mod_remoteip in Tomcat as RemoteIpValve

2009-11-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47330

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #8 from Mark Thomas ma...@apache.org 2009-11-04 18:05:37 GMT ---
Thanks for the updated patch.

I have applied the valve patch to trunk. The filter patch will follow along
with a backport proposal for the valve to 6.0.x

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 47330] proposal : port of mod_remoteip in Tomcat as RemoteIpValve

2009-11-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47330

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #6 from Mark Thomas ma...@apache.org 2009-11-03 17:25:13 GMT ---
The updated patch is missing a bunch of files including the valve and the test
case.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 47330] proposal : port of mod_remoteip in Tomcat as RemoteIpValve

2009-11-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47330

Cyrille Le Clerc cyrille.lecl...@pobox.com changed:

   What|Removed |Added

  Attachment #24455|0   |1
is obsolete||

--- Comment #5 from Cyrille Le Clerc cyrille.lecl...@pobox.com 2009-11-02 
13:17:01 UTC ---
Created an attachment (id=24465)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24465)
Fixed Tomcat 7 patch with successful test case

Here is the fixed patch. A small mistake seems to have been introduced in the
test case during the refactoring.
Unfortunately, my svn diff command did not order the changed files in the
same order as the 24455: Tomcat 7 patch with completed TODOs and failing test
case patch did.


For the Servlet API Filter implementation of this feature, there is some work
to port it from a valve because the HttpServletRequest interface does not ease
adding and removing http headers. 

To do this, I completely reimplemented the headers mechanisms with a case
insensitive list of headers rebuilt in a request wrapper. 

Another apporach could have been to decorate the getXxxHeader() and
getHeaderNames() methods. The getHeaderNames() method would be more complex
because we need to add headers (like x-forwarded-server) but also to remove
some (like x-forwarded-for). If this was an Iterator instead of an Enumeration,
I would use a predicate to exclude the removed headers, a FilterEnumeration
to apply the predicate on the Enumeration and a ChainIterator for the added
headers. This would imply reinventing a subset of Apache Commons Collection
applied to the old ages Enumeration.


Another point on the Filter port of the RemoteIpValve feature is the logging
implementation. Using Tomcat JULI would make reusing this Filter outside of
Tomcat more complex.


The version 1.0.0 of XForwardedFilter.java I linked on a previous comment of
this defect had a bug in the debug statement, here is a fixed version :
http://xebia-france.googlecode.com/svn/web/xebia-servlet-extras/tags/xebia-servlet-extras-1.0.1/src/main/java/fr/xebia/servlet/filter/XForwardedFilter.java

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 47330] proposal : port of mod_remoteip in Tomcat as RemoteIpValve

2009-11-01 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47330

--- Comment #4 from Mark Thomas ma...@apache.org 2009-11-01 18:32:58 GMT ---
Created an attachment (id=24455)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24455)
Tomcat 7 patch with completed TODOs and failing test case

Many thanks for these patches. I'd like to add the valve and filter to Tomcat 7
and the valve to Tomcat 6. I have made the necessary changes to Tomcat 7 the
valve can sit in the right package.

When I applied the patch, I completed the TODOs and added some documentation.
However, one of the test cases failed and my initial investigation suggests
that the patch needs further work.

I have attached my final Tomcat 7 patch. Please update as necessary to correct
the failing test case and then I'll apply it. Once the valve is applied, I'll
look a the filter which will probably be generated by porting the final version
of the valve.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 47330] proposal : port of mod_remoteip in Tomcat as RemoteIpValve

2009-10-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47330

--- Comment #3 from Cyrille Le Clerc cyrille.lecl...@pobox.com 2009-10-11 
03:46:39 UTC ---
As Tomcat valves are currently being converted into Servlet Filter (1), here is
a Servlet Filter implementation of mod_remoteip we called XForwardedFilter : 
http://code.google.com/p/xebia-france/wiki/XForwardedFilter
http://xebia-france.googlecode.com/svn/web/xebia-servlet-extras/tags/xebia-servlet-extras-1.0.0/src/main/java/fr/xebia/servlet/filter/XForwardedFilter.java

Licensing and copyright

The XforwardedFilter code is still licensed ASL 2 but the copyright is for
Xebia and the original author or authors but we can change it to the usual
Apache Software Foundation license and copyright with great pleasure.

Implementation decisions

This filter has been developped before knowing that the Tomcat project would
move from Valve to Filter and is intended to be servlet container agnostic.

We decided to rely on SLF4J for logging to be as portable as possible.
Integrating this Filter in Tomcat project may require to migrate to JULI.

(1) Google Summer Of Code 2009, project Convert current Tomcat valves to
Servlet Filters : http://wiki.apache.org/tomcat/SummerOfCode2009

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 47330] proposal : port of mod_remoteip in Tomcat as RemoteIpValve

2009-07-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47330


Cyrille Le Clerc cyrille.lecl...@pobox.com changed:

   What|Removed |Added

  Attachment #23772|0   |1
is obsolete||
  Attachment #23773|0   |1
is obsolete||




--- Comment #2 from Cyrille Le Clerc cyrille.lecl...@pobox.com  2009-07-13 
09:50:20 PST ---
Created an attachment (id=23970)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=23970)
Second version of the proposed patch

Add support for x-forwarded-proto / x-forwarded-ssl / front-end-https styles
http header for https request : sets request.secure = true, request.scheme =
https, request.serverPort = 443

Detailed documentation at :
http://code.google.com/p/xebia-france/wiki/RemoteIpValve

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org