Re: [pax-web] handling directory listing and welcome files

2018-01-05 Thread Grzegorz Grzybek
Achim, only 6.0.x and 6.1.x - I run all the itests locally and on jenkins.
I'll do master and 4.x branches next week.

Have a good weekend!
Grzegorz Grzybek

2018-01-05 19:02 GMT+01:00 'Achim Nierbeck' via OPS4J <
ops4j@googlegroups.com>:

> Hi Grzegorz,
>
> I like your solution, and we should be safe to port those changes to 4.3.x
> and higher.
> Did you also fix it on the current master, or only on the 6.x line?
>
> regards, Achim
>
> 2018-01-04 16:14 GMT+01:00 Grzegorz Grzybek :
>
>> Hello
>>
>> In relation to https://ops4j1.jira.com/browse/PAXWEB-1145 ("Fix welcome
>> file handling"), I'd like to present my unification solution.
>>
>> Currently all the containers work differently. Let's assume:
>>  - war is deployed under "/context" context path
>>  - war contains static resources in the below directory structure:
>> /
>>/WEB-INF/...
>>/static/
>>   /misc/
>>  start.txt
>>  - war declares start.txt
>>
>> Now:
>>  - request for http://localhost:8181/context ends with HTTP 302
>> (correct) - redirect to "/"
>>  - request for http://localhost:8181/context/ ends with HTTP 404 -
>> wrong, because it should be case for "directory listing" which we don't
>> enable
>>  - request for http://localhost:8181/context/static ends with HTTP 200
>> and 0-size response. Wrong, because we rely on
>> org.osgi.framework.Bundle.getResource() and can't tell if the returned
>> URL is directory or not
>>  - request for http://localhost:8181/context/static/ ends with HTTP 403
>> - correct
>>  - request for http://localhost:8181/context/static/misc ends with HTTP
>> 200 and 0-size response. Wrong.
>>  - request for http://localhost:8181/context/static/misc/ ends with
>> forward to /static/misc/start.txt (welcome file works, but not on every
>> container. I.e., only on Undertow)
>>
>> I fixed the problems and now:
>>  - http://localhost:8181/context and http://localhost:8181/context/ ends
>> with 403 (directory listing disabled - not relevant IMO with bundles)
>>  - http://127.0.0.1:8181/war-bundle/static ends with HTTP 200 - still
>> confusing, but I really can't tell whether the path is directory or not
>> (maybe there's way to do it - I know Felix can list the content, but it
>> know about JarContent, etc.)
>>  - http://127.0.0.1:8181/war-bundle/static/ ends with HTTP 403
>> (directory listing case)
>>  - http://127.0.0.1:8181/war-bundle/static/misc and
>> http://127.0.0.1:8181/war-bundle/static/misc/ forward to start.txt - in
>> first case I explicitly verify if 0-sized "input stream from directory
>> entry" means it's really a directory - by checking all the welcome files
>>
>> I want to fix this in all versions starting with 4.3.x. What do you think?
>>
>> best regards and Happy New Year (for all I didn't wish it yet)
>> Grzegorz Grzybek
>>
>> --
>> --
>> --
>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "OPS4J" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to ops4j+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
> Apache Member
> Apache Karaf  Committer & PMC
> OPS4J Pax Web  Committer &
> Project Lead
> blog 
> Co-Author of Apache Karaf Cookbook 
>
> Software Architect / Project Manager / Scrum Master
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: PAX-HTTP-WHITEBOARD hangs on Karaf 4.1.2

2018-01-05 Thread 'Achim Nierbeck' via OPS4J
Hi,

are you sure it really hangs, or is jline and therefore the shell not
responsive anymore.


regards, Achim

2018-01-04 19:58 GMT+01:00 Grzegorz Grzybek :

> Hello
>
> Did you by any chance get a thread dump? That's really strange... It works
> fine on Linux, so JLine seems to be the problem... I don't have Windows box
> at hand so it'll take more time for me...
>
> regards
> Grzegorz Grzybek
>
> 2018-01-04 12:59 GMT+01:00 Maurice Betzel :
>
>> Using platform: Windows 10 x86_64, Java 1.8.0_144, Karaf 4.1.2, Pax Web
>> 6.1.0
>>
>> Trying to install pax-http-whiteboard on karaf lockes up the console.
>> To reproduce, start up a clean karaf and add pax-web features:
>>
>> karaf@root()> feature:repo-add mvn:org.ops4j.pax.web/pax-web-features/6.1
>> .0/xml/features
>>
>> Installing pax-http-whiteboard:
>>
>> karaf@root()> feature:install pax-http-whiteboard/6.1.0
>>
>> JLine gives a exception along the way, log:
>>
>> 2018-01-04T12:56:00,835 | DEBUG | features-1-thread-1 |
>> jline| 49 - org.jline - 3.4.0 | Error
>> creating JNA based terminal: [6] The handle is invalid.
>> com.sun.jna.LastErrorException: [6] The handle is invalid.
>> at com.sun.jna.Native.invokeVoid(Native Method) ~[?:?]
>> at com.sun.jna.Function.invoke(Function.java:408) ~[?:?]
>> at com.sun.jna.Function.invoke(Function.java:354) ~[?:?]
>> at com.sun.jna.Library$Handler.invoke(Library.java:244) ~[?:?]
>> at 
>> org.jline.terminal.impl.jna.win.$Proxy52.GetConsoleScreenBufferInfo(Unknown
>> Source) ~[?:?]
>> at org.jline.terminal.impl.jna.win.WindowsAnsiOutputStream.getC
>> onsoleInfo(WindowsAnsiOutputStream.java:92) ~[?:?]
>> at org.jline.terminal.impl.jna.win.WindowsAnsiOutputStream.> t>(WindowsAnsiOutputStream.java:86) ~[?:?]
>> at 
>> org.jline.terminal.impl.jna.win.JnaWinSysTerminal.(JnaWinSysTerminal.java:38)
>> ~[?:?]
>> at 
>> org.jline.terminal.impl.jna.JnaSupportImpl.winSysTerminal(JnaSupportImpl.java:25)
>> ~[?:?]
>> at org.jline.terminal.TerminalBuilder.doBuild(TerminalBuilder.java:243)
>> ~[?:?]
>> at org.jline.terminal.TerminalBuilder.build(TerminalBuilder.java:172)
>> ~[?:?]
>> at org.apache.karaf.shell.impl.console.osgi.LocalConsoleManager
>> .start(LocalConsoleManager.java:65) ~[?:?]
>> at 
>> org.apache.karaf.shell.impl.console.osgi.Activator.start(Activator.java:114)
>> ~[?:?]
>> at 
>> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
>> ~[?:?]
>> at org.apache.felix.framework.Felix.activateBundle(Felix.java:2239)
>> ~[?:?]
>> at org.apache.felix.framework.Felix.startBundle(Felix.java:2145)
>> ~[?:?]
>> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
>> ~[?:?]
>> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984)
>> ~[?:?]
>> at org.apache.karaf.features.internal.service.FeaturesServiceIm
>> pl.startBundle(FeaturesServiceImpl.java:1346) ~[?:?]
>> at 
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:891)
>> ~[?:?]
>> at org.apache.karaf.features.internal.service.FeaturesServiceIm
>> pl.doProvision(FeaturesServiceImpl.java:1233) ~[?:?]
>> at org.apache.karaf.features.internal.service.FeaturesServiceIm
>> pl.lambda$doProvisionInThread$0(FeaturesServiceImpl.java:1132) ~[?:?]
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
>> at 
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>> [?:?]
>> at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>> [?:?]
>> at java.lang.Thread.run(Thread.java:748) [?:?]
>> 2018-01-04T12:56:00,851 | DEBUG | features-1-thread-1 |
>> jline| 49 - org.jline - 3.4.0 | Error
>> creating JANSI based terminal: Could not get the screen info: T
>>
>> --
>> --
>> --
>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "OPS4J" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to ops4j+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master

-- 
--