response cookies version 1
by Edgar Espina
Hi,
Expires attribute isn't set when cookie version = 1. For example:
cookie.setMaxAge(60);
Includes a correct Max-Age attribute but the Expires attributes is
missing. I believe the Expires attribute is optional when max-age is set,
but I also think some legacy browsers (ie <=8) ignore the Max-Age attribute
too.
Should undertow set the Expires attribute when version = 1?
Thanks.
--
edgar
9 years, 9 months
transfer-encoding vs content-length with small response
by Edgar Espina
Hi,
I know that Undertow figure it out a content-length or transfer-encoding
header when none of them was set. That's good and it works as expected.
It seems to be a problem when you explicitly set the "Transfer-Encoding"
header bc Undertow, still add the Content-Length (on small responses?) but
it doesn't remove the Transfer-Encoding header.
On such cases, the response contains both headers, which I think it's
wrong, no?
--
edgar
9 years, 9 months
Undertow responding to unknown host
by Guruprasad Nagaraj
Hi,
I am using Wildfly 8.2 Final.
I am using the default Undertow subsystem configuration -
<subsystem xmlns="urn:jboss:domain:undertow:1.2">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
</server>
<servlet-container name="default">
<jsp-config/>
<websockets/>
</servlet-container>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
</handlers>
<filters>
<response-header name="server-header" header-name="Server" header-value="WildFly/8"/>
<response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
</filters>
</subsystem>
As you see I do not have any aliases apart from the localhost.
I have a local DNS entry which points acme.example.com<http://acme.example.com> to the IP Address of the Wildfly Server/Host.
When I try to fetch a page http://acme.example.com:8080/SVWeb/index.html, I do get the page back. While undertow does not know about this host, how is it that I get the content back?
The Host header in the HTTP request is indeed -
Host: “acme.example.com<http://acme.example.com>:8080"
Should I use any filters or access control to let Undertow know not serve unknown hosts?
Thanks and Best Regards,
GPN
9 years, 9 months
Path prefix in RoutingHandler
by Bill O'Neil
I had a little trouble figuring out how to add a path prefix using the
RoutingHandler. Is this possible? Currently I wrote a custom handler that
wraps and delegates to a RoutingHandler with a fallback PathHandler which
can handle path prefixes.
My use case is a route for serving static assets under the /static/* route.
Thanks,
Bill
9 years, 9 months
Multi Part Reuest Issue in Undertow for Wildfly 8.2.0.Final
by Bikash Gupta
I have migrated my application from Jboss AS 7.1.1.Final to WildFly
8.2.0.Final where I have used Primeface 5, Shiro and Rewrite 2.0.12. Due to
this migration my upload has stopped working.
Based on the comments in Rewrite Forum(
http://www.ocpsoft.org/support/topic/command-not-fired-with-multipart-for...),
I have replaced undertow module jar with latest version
undertow-core-1.2.0.Beta9.jar
undertow-servlet-1.2.0.Beta9.jar
undertow-websockets-jsr-1.2.0.Beta9.jar
Still the upload is not working.
As suggested in other forums I have also tried custom FileUploadFilter for
MultiPartReuest. Still no luck.
Please suggest!!!
--
Regards
Biks
9 years, 10 months
War deployment to undertow
by Dharmesh Data
Hi,
I recently found some articles which shows undertow has excellent
performance especially because of asynchronous non-blocking io. So I am
trying to do a PoC to see if it fits our needs.
I tried to deploy our war file with embedded undertow. Below is the sample
code, warpath is the absolute path for war file.
Server starts up but doesn’t do anything. It works fine if I put undertow
inside the war and explicitly adds servlets and filters to undertow, but we
are interested in keeping war independent of any container libraries.
Our application Servlet Context Listener would add servlets and filters.
Application will create a war and we are trying to deploy that war to
undertow. Is it possible to do that? Can you please show how to do it? Any
help is deeply appreciated.
DeploymentInfo servletBuilder = Servlets.*deployment*()
.setClassLoader(Startup.*class*.getClassLoader())
.setContextPath("/")
.setDeploymentName(warPath);
DeploymentManager manager = Servlets.*defaultContainer*
().addDeployment(servletBuilder);
manager.deploy();
Undertow server = Undertow.*builder*()
.addHttpListener(*8080*, "localhost")
.setHandler(manager.start()).build();
server.start();
Thank you,
Dharmesh Data
9 years, 10 months