Separate deployment: content "cut" with .html #2775

Closed
avernet opened this Issue May 10, 2016 · 6 comments

Projects

None yet

2 participants

@avernet
Collaborator
avernet commented May 10, 2016

To reproduce, deploy myapp.zip along Orbeon Forms. Notice how, with:

  • http://localhost:8080/myapp/xforms/guess.jsp the "guess the number" example works (first screenshot below).
  • http://localhost:8080/myapp/xforms/guess.html it doesn't work and only part of the markup is sent to the browser (second screenshot below).

works

cut

@ebruchez ebruchez was assigned by avernet May 10, 2016
@avernet avernet added the XForms label May 10, 2016
@avernet avernet added this to the 2016.2 milestone May 10, 2016
@avernet
Collaborator
avernet commented May 10, 2016
@ebruchez
Collaborator
ebruchez commented May 23, 2016 edited

Curiously, both works for me with Apache Tomcat/7.0.68. @avernet used Tomcat/8.0.33.

@ebruchez
Collaborator

With a stock 2016.1.201604200638-PE release, it works for me with Tomcat 7.0.68, but not Tomcat 8.0.21.

@ebruchez
Collaborator
ebruchez commented May 23, 2016 edited

Findings so far:

  • filter is called and renderer outputs the entire HTML
  • in OrbeonXFormsFilter, getOrbeonDispatcher().forward() causes the passed HttpServletResponse to receive all the content (tested by overloading getOutputStream())
  • in fact so far I don't see a difference between the JSP and the HTML case from the filter's point of view
  • however, for some reason, in the .html case, the response doesn't make it to the client entirely
  • using the .foo extension produces the same result
  • calling from wget produces the same result
@ebruchez
Collaborator

Making progress by comparing the CoyoteOutputStream in both cases:

  • the stream gets a contentLength of 3166 in the case which doesn't work (that's the size of the input HTML file!)
  • this is set at some point during processing of doFilter()
  • however, our FilterResponseWrapper filters calls to setContentLength() as well as setHeader() and setIntHeader(), so it's unclear which piece of code does this!
  • calling by hand setContentLength(-1) after doFilter() makes it work, but it feels a bit hacky
@ebruchez ebruchez closed this in 46e8bb3 May 23, 2016
@ebruchez
Collaborator

Attaching the screenshots for reference.

bad
good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment