[jira] [Created] (MTOMCAT-210) Tomcat7 plugin fails in multi module project when test dependencies are present

2013-02-28 Thread Ludwig Magnusson (JIRA)
Ludwig Magnusson created MTOMCAT-210:


 Summary: Tomcat7 plugin fails in multi module project when test 
dependencies are present
 Key: MTOMCAT-210
 URL: https://issues.apache.org/jira/browse/MTOMCAT-210
 Project: Apache Tomcat Maven Plugin
  Issue Type: Bug
  Components: tomcat7
Affects Versions: 2.1
Reporter: Ludwig Magnusson
Assignee: Olivier Lamy (*$^¨%`£)


In a multi module project:
parent 
 - api
 - impl
 - webapp

Suppose that the impl depends on api with scope compile and on the api tests 
with scope test:


mygroup
api
${project.version}


mygroup
api
${project.version}
tests
test


This will cause tomcat7:run to fail. It says that it cannot find api-tests.jar 
even though it should not look for it. The plugin works if one runs "mvn 
test-compile tomcat7:run" because now the test classes are included in the 
reactor.

This bug is not present in the tomcat6 plugin.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[Bug 54618] New: Add filter implementing HTTP Strict Transport Security (HSTS)

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54618

Bug ID: 54618
   Summary: Add filter implementing HTTP Strict Transport Security
(HSTS)
   Product: Tomcat 7
   Version: unspecified
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: jens.borgl...@gmail.com
Classification: Unclassified

Created attachment 3
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=3&action=edit
The actual filter

The specification for HTTP Strict Transport Security (HSTS) has now been
published (RFC 6797). Tomcat should include a filter implementing the
specification to make it easy to add to web applications.

I have attached an implementation suggestion.

-- 
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



[Bug 54618] Add filter implementing HTTP Strict Transport Security (HSTS)

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54618

--- Comment #1 from Jens Borgland  ---
Created attachment 30001
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30001&action=edit
A test

-- 
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



[Bug 54618] Add filter implementing HTTP Strict Transport Security (HSTS)

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54618

--- Comment #2 from Jens Borgland  ---
Created attachment 30002
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30002&action=edit
New error message property

-- 
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



[Bug 54618] Add filter implementing HTTP Strict Transport Security (HSTS)

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54618

Jens Borgland  changed:

   What|Removed |Added

 CC||jens.borgl...@gmail.com

-- 
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



[Bug 54618] Add filter implementing HTTP Strict Transport Security (HSTS)

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54618

--- Comment #3 from Jens Borgland  ---
Created attachment 30003
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30003&action=edit
Proposed implementation as unified diff

-- 
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



[Bug 54619] New: JSSESocketFactory Webdav over SSL with windows explorer

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54619

Bug ID: 54619
   Summary: JSSESocketFactory Webdav over SSL with windows
explorer
   Product: Tomcat 7
   Version: 7.0.37
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: f...@fasihi.net
Classification: Unclassified

since 7.0.37 all requests coming from "Microsoft-WebDAV-MiniRedir/6.1.7601"
(Windows Explorer) via SSL run into the Exception in
"org.apache.tomcat.util.net.jsse.JSSESocketFactory" line 197:

if (session.getCipherSuite().equals("SSL_NULL_WITH_NULL_NULL"))
throw new IOException("SSL handshake failed. Ciper suite in SSL
Session is SSL_NULL_WITH_NULL_NULL");

I'm not much of an SSL expert (obviously), but i think this is not the way it's
supposed to be. After a downgrade to Tomcat 7.0.35 it works again (didn't test
7.0.36). When using tomcat-coyote.jar from 7.0.35 with Tomcat 7.0.37 it works
as well.

I guess Tomcat's Webdav implementation won't work over SSL with Windows
Explorer in my current constellation.

-- 
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



[Bug 54620] New: [PATCH] custom mod_jk availability checks

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54620

Bug ID: 54620
   Summary: [PATCH] custom mod_jk availability checks
   Product: Tomcat Connectors
   Version: 1.2.37
  Hardware: HP
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: mod_jk
  Assignee: dev@tomcat.apache.org
  Reporter: alan.fit...@igmarkets.com
Classification: Unclassified

Hi,

I've added a feature to mod_jk which provides an alternative to CPING/CPONG to
determine if a worker is "alive". It allows you to configure a URI to test
(using a GET request), and an expected HTTP status code.

worker.tomcat_default.custom_check_expected_status=200
worker.tomcat_default.custom_check_uri=/app/somefile

The reason for this is that we do rolling deploys across a cluster of Tomcat
servers, and in the time the app is redeploying mod_jk continues to route
requests to the Tomcat instance, resulting in 404's to our clients.

Is this something which would be considered for inclusion in mod_jk? Does it
need more work?

Thanks and Best Regards,

-- 
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



[Bug 54621] New: [PATCH] custom mod_jk availability checks

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54621

Bug ID: 54621
   Summary: [PATCH] custom mod_jk availability checks
   Product: Tomcat Connectors
   Version: 1.2.37
  Hardware: HP
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: mod_jk
  Assignee: dev@tomcat.apache.org
  Reporter: alan.fit...@igmarkets.com
Classification: Unclassified

Created attachment 30004
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30004&action=edit
Patch to add custom ping feature

Hi,

I've added a feature to mod_jk which provides an alternative to CPING/CPONG to
determine if a worker is "alive". It allows you to configure a URI to test
(using a GET request), and an expected HTTP status code.

worker.tomcat_default.custom_check_expected_status=200
worker.tomcat_default.custom_check_uri=/app/somefile

The reason for this is that we do rolling deploys across a cluster of Tomcat
servers, and in the time the app is redeploying mod_jk continues to route
requests to the Tomcat instance, resulting in 404's to our clients.

Is this something which would be considered for inclusion in mod_jk? Does it
need more work?

Thanks and Best Regards,

-- 
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



[Tomcat Wiki] Trivial Update of "FAQ/Monitoring" by KonstantinKolinko

2013-02-28 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "FAQ/Monitoring" page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/Monitoring?action=diff&rev1=10&rev2=11

Comment:
Add this page to FAQ category

  
  Plug-in-based monitoring software like Nagios and Icinga may need some help 
interacting with Tomcat's JMXProxyServlet. [[tools/check_jmxproxy.pl]] is a 
Perl script that can be used with these tools to monitor Tomcat via the 
JMXProxyServlet.
  
+ 
+ [[CategoryFAQ]]
+ 

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



[Bug 54620] [PATCH] custom mod_jk availability checks

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54620

Alan F  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Alan F  ---


*** This bug has been marked as a duplicate of bug 54621 ***

-- 
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



[Bug 54621] [PATCH] custom mod_jk availability checks

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54621

--- Comment #1 from Alan F  ---
*** Bug 54620 has been marked as a duplicate of this bug. ***

-- 
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



[Bug 46676] Configurable test request for Watchdog thread

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46676

--- Comment #2 from Alan F  ---
Maybe you're not interested in this anymore, but I wrote a patch to do this.
See here:

https://issues.apache.org/bugzilla/show_bug.cgi?id=54621

-- 
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



[Bug 54604] NPE at InternalInputBuffer.java while using AsyncContext

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54604

Prakasaraman.V  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |---

--- Comment #4 from Prakasaraman.V  ---
Hi Mark Thomas,

Thanks for your guidance. I have tried with asyncContext.setTimeout(0). This is
working fine with Tomcat 7.0.29 but it fails in Tomcat 7.0.21.

In Tomcat 7.0.21, I am getting the below mentioned SocketTimeoutException.
Since this is working fine in Tomcat 7.0.29, I assume there should be a change
in source with respect to this issue in one of the Tomcat 7.0.21 post releases.
Could you help me to locate the exact fix (source changes) for this issue so
that I can make it on top of 7.0.21 source.

java.net.SocketTimeoutException
at
org.apache.tomcat.util.net.NioBlockingSelector.read(NioBlockingSelector.java:189)
at
org.apache.tomcat.util.net.NioSelectorPool.read(NioSelectorPool.java:228)
at
org.apache.tomcat.util.net.NioSelectorPool.read(NioSelectorPool.java:209)
at
org.apache.coyote.http11.InternalNioInputBuffer.readSocket(InternalNioInputBuffer.java:403)
at
org.apache.coyote.http11.InternalNioInputBuffer.fill(InternalNioInputBuffer.java:759)
at
org.apache.coyote.http11.InternalNioInputBuffer$SocketInputBuffer.doRead(InternalNioInputBuffer.java:784)
at
org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:118)
at
org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuffer.java:331)
at org.apache.coyote.Request.doRead(Request.java:422)
at
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:287)
at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:407)
at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:310)
at
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:202)
at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at java.io.BufferedReader.fill(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at test.TestAsyncFilter.readContent(TestAsyncFilter.java:83)
at test.TestAsyncFilter.access$0(TestAsyncFilter.java:67)
at test.TestAsyncFilter$1.run(TestAsyncFilter.java:54)
at
org.apache.catalina.core.AsyncContextImpl$RunnableWrapper.run(AsyncContextImpl.java:472)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Thanks & Regards,
Prakasaraman.V

-- 
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



[Bug 54619] JSSESocketFactory Webdav over SSL with windows explorer

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54619

Konstantin Kolinko  changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Konstantin Kolinko  ---
Tomcat 7.0.37 is more strict in processing its SSL configuration, thanks to
fixing bug 54406.

It is very likely that your configuration is incorrect. You should ask on the
users mailing list (not the dev one) and maybe people there would be able to
help you.

-- 
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



[Bug 54621] [PATCH] custom mod_jk availability checks

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54621

Mark Thomas  changed:

   What|Removed |Added

 CC||gerhardus.geldenhuis@gmail.
   ||com

--- Comment #2 from Mark Thomas  ---
*** Bug 46676 has been marked as a duplicate of this bug. ***

-- 
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



[Bug 46676] Configurable test request for Watchdog thread

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46676

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from Mark Thomas  ---
We don't need multiple issues tracking the same request.

I'd normally close the newer issue as a duplciate but since the newer issue has
a patch it is better to leave it open. I am therefore closing this request as a
duplciate of the new issue that has the patch.

*** This bug has been marked as a duplicate of bug 54621 ***

-- 
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



[Bug 54604] NPE at InternalInputBuffer.java while using AsyncContext

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54604

Mark Thomas  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |INVALID

--- Comment #5 from Mark Thomas  ---
There is no bug to fix here. The supported (by the Tomcat community) option is
to upgrade your Tomcat instance. If you want to do something else then the
users list is the place to seek further assistance.

As a pointer to get you started:
- test the Tomcat instances between 7.0.21 and 7.0.29 to narrow down the search
for this particular fix
- review the chnagelog for the version with the fix
- if nothing in the change log strikes you as async related you could review
the diff between the tag that works and the tag that doesn't
- finally you can do a binary search for the revision with the fix by building
Tomcat from a specific svn revision using the revisions for the tags as the
upper and lower limits to start with

-- 
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



[Bug 54619] JSSESocketFactory Webdav over SSL with windows explorer

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54619

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from Mark Thomas  ---
Yes, this looks like a ciphers mis-match. Resolving as invalid until proved
otherwise (at which point feel free to re-open this and provided the necessary
information to re-roduce).

-- 
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



[Bug 54618] Add filter implementing HTTP Strict Transport Security (HSTS)

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54618

--- Comment #4 from Mark Thomas  ---
HSTS has a fairly major hole: the bootstrap MITM problem. There are suggested
solutions but the current pre-loaded lists contain a very small number of
sites. Further, the practicalities of trying to build a reasonable pre-loaded
list mean that a pre-loaded list is very unlikely to resolve the bootstrap MITM
problem.

Personally, I not convinced of the usefulness of this feature at this point in
time.

-- 
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



[Bug 54618] Add filter implementing HTTP Strict Transport Security (HSTS)

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54618

--- Comment #5 from Jens Borgland  ---
I agree that the bootstrapping is a problem (and it's recognized in the RFC as
well) but I still think that HSTS helps reduce the attack window quite
drastically and therefore has significant benefits.

Tomcat is also often used for more or less internal applications within
organizations where a pre-loaded list (perhaps configured using a group policy)
may very well be a viable solution.

-- 
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



[Bug 54621] [PATCH] custom mod_jk availability checks

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54621

Rainer Jung  changed:

   What|Removed |Added

   Keywords||PatchAvailable

-- 
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



[Bug 54602] B2CConverter character decode underflow leaves bytes in buffer

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54602

--- Comment #2 from Mark Thomas  ---
Part of the problem here is that the UTF-8 decoder should reject bytes 5-8 as
an invalid sequence but doesn't. That is a JVM bug that needs to be reported to
Oracle.

Given the widespread use of UTF-8 I suspect we'll need to look at using the
stricter UTF-8 decoder we use in WebSocket more widely.

A second issue (that doesn't affect this report) is that the leftover byte
array is not big enough for the decoders available in the JRE.

-- 
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



[Bug 54602] B2CConverter character decode underflow leaves bytes in buffer

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54602

--- Comment #3 from NateC  ---
InputStreamReader defaults to replacement characters so it won't reject those
characters just replace them with the replacement.

The underlying InputStreamReader holds on to those remaining bytes because it
is waiting for the last byte or end of stream but because B2CCoverter doesn't
try to read any more it never sees the the end of stream.

If B2CConver was changed to just read until ReadConvertor returned -1 then the
bytes wouldn't be left behind and the those last 4 bytes would be replaced with
the replacement character.

If you want invalid UTF-8 to be rejected you would have to update the
constructor of ReadConvertor to call super which takes a CharsetDecoder which
uses CodingErrorAction.REPORT, but that is a much bigger change.

I'll work on the test at some point, but I don't have the time currently to get
that working.

-- 
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



[jira] [Created] (MTOMCAT-211) The .war file is not extracted from executable war

2013-02-28 Thread Petr Novak (JIRA)
Petr Novak created MTOMCAT-211:
--

 Summary: The .war file is not extracted from executable war
 Key: MTOMCAT-211
 URL: https://issues.apache.org/jira/browse/MTOMCAT-211
 Project: Apache Tomcat Maven Plugin
  Issue Type: Bug
  Components: tomcat7
Affects Versions: 2.2
 Environment: Windows 7 64bit, Oracle JDK-1.7.0.11, Maven-2.2
Reporter: Petr Novak
Assignee: Olivier Lamy (*$^¨%`£)


I create simple web-app project, build it by mvn clean package.

Than I try to execute the created JAR, but the following exception was thrown:

java -jar maven-tomcat-test-0.0.1-SNAPSHOT-war-exec.jar
Exception in thread "main" java.io.FileNotFoundException: 
.extract\webapps\ctx\test.war (The system cannot find the path specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:212)
at java.io.FileOutputStream.(FileOutputStream.java:165)
at 
org.apache.tomcat.maven.runner.Tomcat7Runner.expand(Tomcat7Runner.java:680)
at 
org.apache.tomcat.maven.runner.Tomcat7Runner.extract(Tomcat7Runner.java:555)
at 
org.apache.tomcat.maven.runner.Tomcat7Runner.run(Tomcat7Runner.java:200)
at 
org.apache.tomcat.maven.runner.Tomcat7RunnerCli.main(Tomcat7RunnerCli.java:204)

When I look at ".extract\webapps\ctx\" , the folder is empty.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Updated] (MTOMCAT-211) The .war file is not extracted from executable war

2013-02-28 Thread Petr Novak (JIRA)

 [ 
https://issues.apache.org/jira/browse/MTOMCAT-211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Petr Novak updated MTOMCAT-211:
---

Attachment: maven-tomcat-test.zip
maven-tomcat-test-0.0.1-SNAPSHOT-war-exec.jar

The project

> The .war file is not extracted from executable war
> --
>
> Key: MTOMCAT-211
> URL: https://issues.apache.org/jira/browse/MTOMCAT-211
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Bug
>  Components: tomcat7
>Affects Versions: 2.2
> Environment: Windows 7 64bit, Oracle JDK-1.7.0.11, Maven-2.2
>Reporter: Petr Novak
>Assignee: Olivier Lamy (*$^¨%`£)
> Attachments: maven-tomcat-test-0.0.1-SNAPSHOT-war-exec.jar, 
> maven-tomcat-test.zip
>
>
> I create simple web-app project, build it by mvn clean package.
> Than I try to execute the created JAR, but the following exception was thrown:
> java -jar maven-tomcat-test-0.0.1-SNAPSHOT-war-exec.jar
> Exception in thread "main" java.io.FileNotFoundException: 
> .extract\webapps\ctx\test.war (The system cannot find the path specified)
> at java.io.FileOutputStream.open(Native Method)
> at java.io.FileOutputStream.(FileOutputStream.java:212)
> at java.io.FileOutputStream.(FileOutputStream.java:165)
> at 
> org.apache.tomcat.maven.runner.Tomcat7Runner.expand(Tomcat7Runner.java:680)
> at 
> org.apache.tomcat.maven.runner.Tomcat7Runner.extract(Tomcat7Runner.java:555)
> at 
> org.apache.tomcat.maven.runner.Tomcat7Runner.run(Tomcat7Runner.java:200)
> at 
> org.apache.tomcat.maven.runner.Tomcat7RunnerCli.main(Tomcat7RunnerCli.java:204)
> When I look at ".extract\webapps\ctx\" , the folder is empty.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Comment Edited] (MTOMCAT-211) The .war file is not extracted from executable war

2013-02-28 Thread Petr Novak (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13589899#comment-13589899
 ] 

Petr Novak edited comment on MTOMCAT-211 at 2/28/13 8:56 PM:
-

I attached the problematic project.

  was (Author: kek):
The project
  
> The .war file is not extracted from executable war
> --
>
> Key: MTOMCAT-211
> URL: https://issues.apache.org/jira/browse/MTOMCAT-211
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Bug
>  Components: tomcat7
>Affects Versions: 2.2
> Environment: Windows 7 64bit, Oracle JDK-1.7.0.11, Maven-2.2
>Reporter: Petr Novak
>Assignee: Olivier Lamy (*$^¨%`£)
> Attachments: maven-tomcat-test-0.0.1-SNAPSHOT-war-exec.jar, 
> maven-tomcat-test.zip
>
>
> I create simple web-app project, build it by mvn clean package.
> Than I try to execute the created JAR, but the following exception was thrown:
> java -jar maven-tomcat-test-0.0.1-SNAPSHOT-war-exec.jar
> Exception in thread "main" java.io.FileNotFoundException: 
> .extract\webapps\ctx\test.war (The system cannot find the path specified)
> at java.io.FileOutputStream.open(Native Method)
> at java.io.FileOutputStream.(FileOutputStream.java:212)
> at java.io.FileOutputStream.(FileOutputStream.java:165)
> at 
> org.apache.tomcat.maven.runner.Tomcat7Runner.expand(Tomcat7Runner.java:680)
> at 
> org.apache.tomcat.maven.runner.Tomcat7Runner.extract(Tomcat7Runner.java:555)
> at 
> org.apache.tomcat.maven.runner.Tomcat7Runner.run(Tomcat7Runner.java:200)
> at 
> org.apache.tomcat.maven.runner.Tomcat7RunnerCli.main(Tomcat7RunnerCli.java:204)
> When I look at ".extract\webapps\ctx\" , the folder is empty.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (MTOMCAT-211) The .war file is not extracted from executable war

2013-02-28 Thread Petr Novak (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13589921#comment-13589921
 ] 

Petr Novak commented on MTOMCAT-211:


I tried some changes in configuration and detect where is the problem.
The exception is thrown when the project pom.xml file contains the 
configuration of ...  and the context (path) has more than one 
level.
So  /ctx   is OK and the JAR could be executed.
But /ctx/test  (2-level path) has problem,  the included war-file 
is not extracted from encapsulating jar.


> The .war file is not extracted from executable war
> --
>
> Key: MTOMCAT-211
> URL: https://issues.apache.org/jira/browse/MTOMCAT-211
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Bug
>  Components: tomcat7
>Affects Versions: 2.2
> Environment: Windows 7 64bit, Oracle JDK-1.7.0.11, Maven-2.2
>Reporter: Petr Novak
>Assignee: Olivier Lamy (*$^¨%`£)
> Attachments: maven-tomcat-test-0.0.1-SNAPSHOT-war-exec.jar, 
> maven-tomcat-test.zip
>
>
> I create simple web-app project, build it by mvn clean package.
> Than I try to execute the created JAR, but the following exception was thrown:
> java -jar maven-tomcat-test-0.0.1-SNAPSHOT-war-exec.jar
> Exception in thread "main" java.io.FileNotFoundException: 
> .extract\webapps\ctx\test.war (The system cannot find the path specified)
> at java.io.FileOutputStream.open(Native Method)
> at java.io.FileOutputStream.(FileOutputStream.java:212)
> at java.io.FileOutputStream.(FileOutputStream.java:165)
> at 
> org.apache.tomcat.maven.runner.Tomcat7Runner.expand(Tomcat7Runner.java:680)
> at 
> org.apache.tomcat.maven.runner.Tomcat7Runner.extract(Tomcat7Runner.java:555)
> at 
> org.apache.tomcat.maven.runner.Tomcat7Runner.run(Tomcat7Runner.java:200)
> at 
> org.apache.tomcat.maven.runner.Tomcat7RunnerCli.main(Tomcat7RunnerCli.java:204)
> When I look at ".extract\webapps\ctx\" , the folder is empty.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[Tomcat Wiki] Trivial Update of "LynwoodSn" by LynwoodSn

2013-02-28 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "LynwoodSn" page has been changed by LynwoodSn:
http://wiki.apache.org/tomcat/LynwoodSn

New page:
Nothing to say about myself at all.<>
<>
Also visit my web-site; 
[[http://www.etsy.com/shop/CreativeDistortionPh|fine-art prints]]

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



[Tomcat Wiki] Update of "LocalBadContent" by ChuckCaldarale

2013-02-28 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "LocalBadContent" page has been changed by ChuckCaldarale:
http://wiki.apache.org/tomcat/LocalBadContent?action=diff&rev1=74&rev2=75

  envy\.nu
  erectiledysfunctiontreatment\.org 
  eseo\.cn
+ etsy\.com
  eukhost\.com
  evocatus\.com
  exactpages\.com

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



[Bug 54624] New: Form authenticator hangs on re-authentication of POST request behind mod_proxy_ajp

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54624

Bug ID: 54624
   Summary: Form authenticator hangs on re-authentication of POST
request behind mod_proxy_ajp
   Product: Tomcat 7
   Version: 7.0.37
  Hardware: All
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: l...@boylesoftware.com
Classification: Unclassified

Setup: Tomcat AJP connector behind mod_proxy_ajp, form-based authentication.

When session expires and a POST request is submitted, Tomcat shows login form,
user logs in, authenticator tries to restore the original POST request. Doing
that, it tries to swallow the AJP message body before replacing the body of the
request with the original POST request body. It tries to read the first 4 bytes
of the AJP message (the message length) and blocks forever waiting for those 4
bytes.

-- 
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



svn commit: r1451408 - in /tomcat/trunk: java/org/apache/tomcat/util/buf/B2CConverter.java test/org/apache/tomcat/util/buf/TestB2CConverter.java

2013-02-28 Thread markt
Author: markt
Date: Thu Feb 28 22:37:14 2013
New Revision: 1451408

URL: http://svn.apache.org/r1451408
Log:
Add test for size of leftover buffer and increase buffer size to support more 
character sets

Modified:
tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java?rev=1451408&r1=1451407&r2=1451408&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java Thu Feb 28 
22:37:14 2013
@@ -43,6 +43,9 @@ public class B2CConverter {
 public static final Charset ISO_8859_1;
 public static final Charset UTF_8;
 
+// Protected so unit tests can use it
+protected static final int LEFTOVER_SIZE = 9;
+
 static {
 for (Charset charset: Charset.availableCharsets().values()) {
 encodingToCharsetCache.put(
@@ -100,7 +103,7 @@ public class B2CConverter {
 private final ByteBuffer leftovers;
 
 public B2CConverter(String encoding) throws IOException {
-byte[] left = new byte[4];
+byte[] left = new byte[LEFTOVER_SIZE];
 leftovers = ByteBuffer.wrap(left);
 decoder = getCharset(encoding).newDecoder();
 }

Modified: tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java?rev=1451408&r1=1451407&r2=1451408&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java Thu Feb 
28 22:37:14 2013
@@ -16,6 +16,8 @@
  */
 package org.apache.tomcat.util.buf;
 
+import java.nio.charset.Charset;
+
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -57,4 +59,28 @@ public class TestB2CConverter {
 
 System.out.println(cc);
 }
+
+@Test
+public void testLeftoverSize() {
+float maxLeftover = 0;
+for (Charset charset : Charset.availableCharsets().values()) {
+float leftover;
+if (charset.name().toLowerCase().startsWith("x-")) {
+// Non-standard charset that browsers won't be using
+// Likely something used internally by the JRE
+continue;
+}
+try {
+leftover = charset.newEncoder().maxBytesPerChar();
+} catch (UnsupportedOperationException uoe) {
+// Skip it
+continue;
+}
+if (leftover > maxLeftover) {
+maxLeftover = leftover;
+}
+}
+Assert.assertTrue("Limit needs to be at least " + maxLeftover,
+maxLeftover <= B2CConverter.LEFTOVER_SIZE);
+}
 }



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



svn commit: r1451434 - in /tomcat/trunk: java/org/apache/tomcat/util/buf/B2CConverter.java test/org/apache/tomcat/util/buf/TestB2CConverter.java

2013-02-28 Thread markt
Author: markt
Date: Thu Feb 28 23:30:14 2013
New Revision: 1451434

URL: http://svn.apache.org/r1451434
Log:
Add option to converter so client can indicate no more input is available
Add some more tests for BZ54602
TODO: Review the use of the now deprecated code

Modified:
tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java?rev=1451434&r1=1451433&r2=1451434&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java Thu Feb 28 
23:30:14 2013
@@ -125,8 +125,22 @@ public class B2CConverter {
  *
  * @param bc byte input
  * @param cc char output
+ *
+ * @deprecated  Use {@link #convert(ByteChunk, CharChunk, boolean)
+ */
+@Deprecated
+public void convert(ByteChunk bc, CharChunk cc) throws IOException {
+convert(bc, cc, false);
+}
+
+/**
+ * Convert the given bytes to characters.
+ *
+ * @param bc byte input
+ * @param cc char output
+ * @param endOfInputIs this all of the available data
  */
-public void convert(ByteChunk bc, CharChunk cc)
+public void convert(ByteChunk bc, CharChunk cc, boolean endOfInput)
 throws IOException {
 if ((bb == null) || (bb.array() != bc.getBuffer())) {
 // Create a new byte buffer if anything changed
@@ -153,7 +167,7 @@ public class B2CConverter {
 do {
 leftovers.put(bc.substractB());
 leftovers.flip();
-result = decoder.decode(leftovers, cb, false);
+result = decoder.decode(leftovers, cb, endOfInput);
 leftovers.position(leftovers.limit());
 leftovers.limit(leftovers.array().length);
 } while (result.isUnderflow() && (cb.position() == pos));
@@ -165,7 +179,7 @@ public class B2CConverter {
 }
 // Do the decoding and get the results into the byte chunk and the char
 // chunk
-result = decoder.decode(bb, cb, false);
+result = decoder.decode(bb, cb, endOfInput);
 if (result.isError() || result.isMalformed()) {
 result.throwException();
 } else if (result.isOverflow()) {

Modified: tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java?rev=1451434&r1=1451433&r2=1451434&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java Thu Feb 
28 23:30:14 2013
@@ -17,6 +17,7 @@
 package org.apache.tomcat.util.buf;
 
 import java.nio.charset.Charset;
+import java.nio.charset.MalformedInputException;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -26,6 +27,10 @@ public class TestB2CConverter {
 private static final byte[] UTF16_MESSAGE =
 new byte[] {-2, -1, 0, 65, 0, 66, 0, 67};
 
+private static final byte[] UTF8_INVALID = new byte[] {-8, -69, -73, -77};
+
+private static final byte[] UTF8_PARTIAL = new byte[] {-50};
+
 @Test
 public void testSingleMessage() throws Exception {
 testMessages(1);
@@ -50,7 +55,7 @@ public class TestB2CConverter {
 
 for (int i = 0; i < msgCount; i++) {
 bc.append(UTF16_MESSAGE, 0, UTF16_MESSAGE.length);
-conv.convert(bc, cc);
+conv.convert(bc, cc, true);
 Assert.assertEquals("ABC", cc.toString());
 bc.recycle();
 cc.recycle();
@@ -83,4 +88,52 @@ public class TestB2CConverter {
 Assert.assertTrue("Limit needs to be at least " + maxLeftover,
 maxLeftover <= B2CConverter.LEFTOVER_SIZE);
 }
+
+// TODO Work-around bug in UTF8 decoder
+//@Test(expected=MalformedInputException.class)
+public void testBug54602a() throws Exception {
+// Check invalid input is rejected straight away
+B2CConverter conv = new B2CConverter("UTF-8");
+ByteChunk bc = new ByteChunk();
+CharChunk cc = new CharChunk();
+
+bc.append(UTF8_INVALID, 0, UTF8_INVALID.length);
+cc.allocate(bc.getLength(), -1);
+
+conv.convert(bc, cc, false);
+}
+
+@Test(expected=MalformedInputException.class)
+public void testBug54602b() throws Exception {
+// Check partial input is rejected
+B2CConverter conv = new B2CConverter("UTF-8");
+ByteChunk bc = new ByteChunk();
+CharChunk cc = new CharChunk();
+
+bc.append(UTF8_PARTIAL, 0

[Bug 54602] B2CConverter character decode underflow leaves bytes in buffer

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54602

--- Comment #4 from Mark Thomas  ---
The original report was about URI processing. Now you are talking about request
bodies.

There are multiple issues here. So far I have found / suspect:
a) Invalid sequences are not rejected quickly enough
b) Partial sequences are not rejected
c) There is no mechanism for a client of the API to indicate input is complete
d) The storage for bytes left over between calls is not bug enough for all
charsets
e) Leftover bytes may remain between requests

a) is a JVM bug that we can work-around
b) is a consequence of c)
c) is now fixed in trunk but the callers of the API need to be reviewed
d) is fixed in trunk
e) needs further investigation

Also, the handling of incomplete/partial data may need to be different for URIs
and request bodies. There is an argument for request bodies to be more
tolerant.

-- 
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



[Bug 54602] B2CConverter character decode underflow leaves bytes in buffer

2013-02-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54602

--- Comment #5 from NateC  ---
Where do you think I started talking about request bodies?

org.apache.catalina.connector.Request uses a B2CConverter for URIDecoding the
variable is called URIConverter. B2CConverter uses ReadConverter, which is a
very thin wrapper around InputStreamReader, to do its
conversions.InputStreamReader when constructed with just a Charset, like
ReadConverter does, calls StreamDecoder.forInputStreamReader() to construct a
StreamDecoder. StreamDecoder when not constructed with a CharsetDecoder uses
CodingErrorAction.REPLACE for both malformed input and unmappable characters.

-- 
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