From karm at redhat.com Fri Jan 5 09:46:56 2018 From: karm at redhat.com (Karm Michal Babacek) Date: Fri, 5 Jan 2018 09:46:56 -0500 (EST) Subject: [undertow-dev] Fwd: FYI, update: Wildfly-openssl on Windows, OpenSSL 1.0.2n, x86_64 only In-Reply-To: <407601324.3841957.1515163423482.JavaMail.zimbra@redhat.com> References: <407601324.3841957.1515163423482.JavaMail.zimbra@redhat.com> Message-ID: <1068168186.3844431.1515163616014.JavaMail.zimbra@redhat.com> Hi guys, * New OpenSSL community build for windows, updated from 1.0.2h to 1.0.2n [1] * Wildfly-openssl Windows builds back on track [2] * dropped 32bit; i.e. it is just 64bit Windows binaries now Cheers -K- [1] https://ci.modcluster.io/job/openssl-windows/34/label=w2k12r2/ [2] https://ci.modcluster.io/job/wildfly-openssl-windows/60/label=w2k12r2/ -- Sent from my Hosaka Ono-Sendai Cyberspace 7 -- Michal Karm Babacek Fedora community | GMT+1 freenode: #wildfly #mod_cluster #fedora-devel ? http://modcluster.io ? http://modcloudstorage.net ? karm at fedoraproject.org From martin.petzold at tavla.de Sun Jan 14 13:41:15 2018 From: martin.petzold at tavla.de (Martin Petzold) Date: Sun, 14 Jan 2018 19:41:15 +0100 Subject: [undertow-dev] Dynamically add / remove servlets within a context in Undertow Message-ID: Dear Undertow community, my environment is OSGi. I would like to run an embedded web server and add / remove servlets on-the-fly. In Jetty this seem to be possible for servlets contexts but not servlets within a context. It also seems to be possible with some extra work with Jetty. I was wondering if Undertow might be a bit more convenient for this case. Is this possible with undertow and how could I do it? Thanks and regards, Martin From martin.petzold at tavla.de Mon Jan 15 04:59:04 2018 From: martin.petzold at tavla.de (Martin Petzold) Date: Mon, 15 Jan 2018 10:59:04 +0100 Subject: [undertow-dev] Dynamically add / remove servlets within a context in Undertow In-Reply-To: References: Message-ID: <2e375ea0-f70e-14d8-6332-126755699d88@tavla.de> Please find my own conclusions here: https://stackoverflow.com/questions/48238575/how-can-i-dynamically-add-remove-servlets-within-a-context Am 14.01.18 um 19:41 schrieb Martin Petzold: > Dear Undertow community, > > my environment is OSGi. I would like to run an embedded web server and > add / remove servlets on-the-fly. In Jetty this seem to be possible > for servlets contexts but not servlets within a context. It also seems > to be possible with some extra work with Jetty. I was wondering if > Undertow might be a bit more convenient for this case. > > Is this possible with undertow and how could I do it? > > Thanks and regards, > > Martin -- Martin Petzold (Founder and Managing Director) TAVLA Technology UG (haftungsbeschr?nkt) Im Dau 14 50678 Cologne Germany Phone: +49 (0)221 / 3466 0885 Mobile: +49 (0)179 / 9220154 E-Mail: martin.petzold at tavla.de Web: www.tavla.de From boggard at hotmail.com Sun Jan 21 12:12:02 2018 From: boggard at hotmail.com (Fernando Cruz) Date: Sun, 21 Jan 2018 17:12:02 +0000 Subject: [undertow-dev] Handlers routing Message-ID: Hi, I have an issue with the path template for the built in handler "Handlers.routing", when execute this implementation: public class UndertowOnePathVariableApplication { private static final Logger LOGGER = LoggerFactory.getLogger(UndertowOnePathVariableApplication.class); public static void main(final String[] args) { Undertow.builder() .addHttpListener(8080, "localhost") .setHandler( Handlers.routing() .get("/api/v1/orders/", (exchange) -> { LOGGER.info("The path template defined is '/api/v1/orders/'"); LOGGER.info("The request URI '{}' and URL '{}'", exchange.getRequestURI(), exchange.getRequestURL()); exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/plain"); exchange.setStatusCode(StatusCodes.OK) .getResponseSender().send("All Orders"); }) .get("/api/v1/orders/{orderId}", (exchange) -> { LOGGER.info("The path template defined is '/api/v1/orders/{orderId}'"); LOGGER.info("The request URI '{}' and URL '{}'", exchange.getRequestURI(), exchange.getRequestURL()); exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/plain"); exchange.setStatusCode(StatusCodes.OK) .getResponseSender().send( "Order '" + exchange.getQueryParameters().get("orderId").getLast() + "'"); })) .build() .start(); } } I get this responses: boggard at xiuhcoatl:~$ curl -v 'http://localhost:8080/api/v1/orders' * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /api/v1/orders HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.56.0 > Accept: */* > < HTTP/1.1 404 Not Found < Connection: keep-alive < Content-Length: 0 < Date: Sun, 21 Jan 2018 02:01:53 GMT < * Connection #0 to host localhost left intact boggard at xiuhcoatl:~$ curl -v 'http://localhost:8080/api/v1/orders/' * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /api/v1/orders/ HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.56.0 > Accept: */* > < HTTP/1.1 200 OK < Connection: keep-alive < Content-Type: text/plain < Content-Length: 10 < Date: Sun, 21 Jan 2018 02:02:45 GMT < * Connection #0 to host localhost left intact All Orders boggard at xiuhcoatl:~$ curl -v 'http://localhost:8080/api/v1/orders/12345' * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /api/v1/orders/12345 HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.56.0 > Accept: */* > < HTTP/1.1 200 OK < Connection: keep-alive < Content-Type: text/plain < Content-Length: 13 < Date: Sun, 21 Jan 2018 02:03:56 GMT < * Connection #0 to host localhost left intact Order '12345' That I thing is correct because I just define two paths: '.../orders/' and '.../orders/{orderId}'. And the path '.../orders', that is not defined, respond 404. But when use this implementation: public class UndertowTwoPathVariablesApplication { private static final Logger LOGGER = LoggerFactory.getLogger(UndertowTwoPathVariablesApplication.class); public static void main(final String[] args) { Undertow.builder() .addHttpListener(8080, "localhost") .setHandler( Handlers.routing() .get("/api/v1/orders/{orderId}/items/", (exchange) -> { LOGGER.info("The path template defined is '/api/v1/orders/{orderId}/items/'"); LOGGER.info("The request URI '{}' and URL '{}'", exchange.getRequestURI(), exchange.getRequestURL()); exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/plain"); exchange.setStatusCode(StatusCodes.OK) .getResponseSender().send( "Order '" + exchange.getQueryParameters().get("orderId").getLast() + "'"); }) .get("/api/v1/orders/{orderId}/items/{itemId}", (exchange) -> { LOGGER.info("The path template defined is '/api/v1/orders/{orderId}/items/{itemId}'"); LOGGER.info("The request URI '{}' and URL '{}'", exchange.getRequestURI(), exchange.getRequestURL()); exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/plain"); exchange.setStatusCode(StatusCodes.OK) .getResponseSender().send( "Order '" + exchange.getQueryParameters().get("orderId").getLast() + "' Item '" + exchange.getQueryParameters().get("itemId").getLast() + "'"); })) .build() .start(); } } I get this responses: boggard at xiuhcoatl:~$ curl -v 'http://localhost:8080/api/v1/orders/12345/items' * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /api/v1/orders/12345/items HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.56.0 > Accept: */* > < HTTP/1.1 200 OK < Connection: keep-alive < Content-Type: text/plain < Content-Length: 13 < Date: Sun, 21 Jan 2018 02:08:45 GMT < * Connection #0 to host localhost left intact Order '12345' boggard at xiuhcoatl:~$ curl -v 'http://localhost:8080/api/v1/orders/12345/items/' * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /api/v1/orders/12345/items/ HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.56.0 > Accept: */* > < HTTP/1.1 200 OK < Connection: keep-alive < Content-Type: text/plain < Content-Length: 21 < Date: Sun, 21 Jan 2018 02:09:11 GMT < * Connection #0 to host localhost left intact Order '12345' Item '' boggard at xiuhcoatl:~$ curl -v 'http://localhost:8080/api/v1/orders/12345/items/09876' * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /api/v1/orders/12345/items/09876 HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.56.0 > Accept: */* > < HTTP/1.1 200 OK < Connection: keep-alive < Content-Type: text/plain < Content-Length: 26 < Date: Sun, 21 Jan 2018 02:09:30 GMT < * Connection #0 to host localhost left intact Order '12345' Item '09876' That I thing is incorrect because there are just two paths again: '.../orders/{orderId}/items/' and '.../orders/{orderId}/items/{itemId}' but the curl with the exact URI use the second path template. Is this an issue or what I am doing wrong? Best Regards Fernando Cruz From boggard at hotmail.com Sat Jan 27 14:40:00 2018 From: boggard at hotmail.com (Fernando Cruz) Date: Sat, 27 Jan 2018 19:40:00 +0000 Subject: [undertow-dev] Handlers routing In-Reply-To: References: , Message-ID: Stuart: Many thanks for the changes. Where I can get the version 1.4.23.Final? Best Regards ________________________________ From: Stuart Douglas Sent: Monday, January 22, 2018 9:25 PM To: Fernando Cruz Subject: Re: Handlers routing This looks like a bug, I have filed https://issues.jboss.org/browse/UNDERTOW-1272. I am a bit worried that it may cause minor compat problems, but if so they can be fixed by removing the trailing / from the template. Stuart On Tue, Jan 23, 2018 at 4:40 AM, Fernando Cruz > wrote: Hi, I have an issue with the path template for the built in handler "Handlers.routing", when execute this implementation: public class UndertowOnePathVariableApplication { private static final Logger LOGGER = LoggerFactory.getLogger(UndertowOnePathVariableApplication.class); public static void main(final String[] args) { Undertow.builder() .addHttpListener(8080, "localhost") .setHandler( Handlers.routing() .get("/api/v1/orders/", (exchange) -> { LOGGER.info("The path template defined is '/api/v1/orders/'"); LOGGER.info("The request URI '{}' and URL '{}'", exchange.getRequestURI(), exchange.getRequestURL()); exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/plain"); exchange.setStatusCode(StatusCodes.OK) .getResponseSender().send("All Orders"); }) .get("/api/v1/orders/{orderId}", (exchange) -> { LOGGER.info("The path template defined is '/api/v1/orders/{orderId}'"); LOGGER.info("The request URI '{}' and URL '{}'", exchange.getRequestURI(), exchange.getRequestURL()); exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/plain"); exchange.setStatusCode(StatusCodes.OK) .getResponseSender().send( "Order '" + exchange.getQueryParameters().get("orderId").getLast() + "'"); })) .build() .start(); } } I get this responses: boggard at xiuhcoatl:~$ curl -v 'http://localhost:8080/api/v1/orders' * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /api/v1/orders HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.56.0 > Accept: */* > < HTTP/1.1 404 Not Found < Connection: keep-alive < Content-Length: 0 < Date: Sun, 21 Jan 2018 02:01:53 GMT < * Connection #0 to host localhost left intact boggard at xiuhcoatl:~$ curl -v 'http://localhost:8080/api/v1/orders/' * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /api/v1/orders/ HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.56.0 > Accept: */* > < HTTP/1.1 200 OK < Connection: keep-alive < Content-Type: text/plain < Content-Length: 10 < Date: Sun, 21 Jan 2018 02:02:45 GMT < * Connection #0 to host localhost left intact All Orders boggard at xiuhcoatl:~$ curl -v 'http://localhost:8080/api/v1/orders/12345' * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /api/v1/orders/12345 HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.56.0 > Accept: */* > < HTTP/1.1 200 OK < Connection: keep-alive < Content-Type: text/plain < Content-Length: 13 < Date: Sun, 21 Jan 2018 02:03:56 GMT < * Connection #0 to host localhost left intact Order '12345' That I thing is correct because I just define two paths: '.../orders/' and '.../orders/{orderId}'. And the path '.../orders', that is not defined, respond 404. But when use this implementation: public class UndertowTwoPathVariablesApplication { private static final Logger LOGGER = LoggerFactory.getLogger(UndertowTwoPathVariablesApplication.class); public static void main(final String[] args) { Undertow.builder() .addHttpListener(8080, "localhost") .setHandler( Handlers.routing() .get("/api/v1/orders/{orderId}/items/", (exchange) -> { LOGGER.info("The path template defined is '/api/v1/orders/{orderId}/items/'"); LOGGER.info("The request URI '{}' and URL '{}'", exchange.getRequestURI(), exchange.getRequestURL()); exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/plain"); exchange.setStatusCode(StatusCodes.OK) .getResponseSender().send( "Order '" + exchange.getQueryParameters().get("orderId").getLast() + "'"); }) .get("/api/v1/orders/{orderId}/items/{itemId}", (exchange) -> { LOGGER.info("The path template defined is '/api/v1/orders/{orderId}/items/{itemId}'"); LOGGER.info("The request URI '{}' and URL '{}'", exchange.getRequestURI(), exchange.getRequestURL()); exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/plain"); exchange.setStatusCode(StatusCodes.OK) .getResponseSender().send( "Order '" + exchange.getQueryParameters().get("orderId").getLast() + "' Item '" + exchange.getQueryParameters().get("itemId").getLast() + "'"); })) .build() .start(); } } I get this responses: boggard at xiuhcoatl:~$ curl -v 'http://localhost:8080/api/v1/orders/12345/items' * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /api/v1/orders/12345/items HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.56.0 > Accept: */* > < HTTP/1.1 200 OK < Connection: keep-alive < Content-Type: text/plain < Content-Length: 13 < Date: Sun, 21 Jan 2018 02:08:45 GMT < * Connection #0 to host localhost left intact Order '12345' boggard at xiuhcoatl:~$ curl -v 'http://localhost:8080/api/v1/orders/12345/items/' * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /api/v1/orders/12345/items/ HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.56.0 > Accept: */* > < HTTP/1.1 200 OK < Connection: keep-alive < Content-Type: text/plain < Content-Length: 21 < Date: Sun, 21 Jan 2018 02:09:11 GMT < * Connection #0 to host localhost left intact Order '12345' Item '' boggard at xiuhcoatl:~$ curl -v 'http://localhost:8080/api/v1/orders/12345/items/09876' * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /api/v1/orders/12345/items/09876 HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.56.0 > Accept: */* > < HTTP/1.1 200 OK < Connection: keep-alive < Content-Type: text/plain < Content-Length: 26 < Date: Sun, 21 Jan 2018 02:09:30 GMT < * Connection #0 to host localhost left intact Order '12345' Item '09876' That I thing is incorrect because there are just two paths again: '.../orders/{orderId}/items/' and '.../orders/{orderId}/items/{itemId}' but the curl with the exact URI use the second path template. Is this an issue or what I am doing wrong? Best Regards Fernando Cruz -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20180127/b892d02e/attachment-0001.html