Closed
Bug 1252164
Opened 9 years ago
Closed 9 years ago
tomcat throws "broken pipe" messages when browser fetches PDF file
Categories
(Firefox :: PDF Viewer, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: jmreymond, Unassigned)
References
Details
(Keywords: regression, Whiteboard: [pdfjs-c-integration])
Attachments
(1 file)
(deleted),
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20160209234513
Steps to reproduce:
A small piece of code to display file is OK in Chromium but failed in Firefox 44.0.2/Ubuntu 15.10
Actual results:
exception in tomcat because the socket is broken
ClientAbortException: java.net.SocketException: Relais brisé (pipe)
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:406)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:371)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:431)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:419)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91)
at org.apache.catalina.filters.ExpiresFilter$XServletOutputStream.write(ExpiresFilter.java:986)
at navigator.server.GetFile.doGet(GetFile.java:104)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.ExpiresFilter.doFilter(ExpiresFilter.java:1179)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Relais brisé
Expected results:
as in Chromium (or Safari), display the PDF inline
Please note that when displaying the source, clicking the url is OK
Reporter | ||
Updated•9 years ago
|
Component: Untriaged → PDF Viewer
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Regression range:
https://hg.mozilla.org/integration/fx-team/pushloghtml?fromchange=aaae8916f1078ffbd577c30e275c17a9d1c1f56b&tochange=9a9a92d6d78b8abd656ad69d0a04c33dec394584
Yury, I guess it's the expected behavior?
Comment 2•9 years ago
|
||
Something wrong with the content returned by the servlet (?). When I replace the src with e.g. "http://cdn.mozilla.net/pdfjs/tracemonkey.pdf" everything works as expected. I recommend to fix the GetFile script to return proper HTTP headers. At the moment the HTTP response headers contain:
Content-Disposition: attachement; filename*=UTF-8''CV_Yann_Pesenti_PM.pdf
which is wrong by the spec (see http://www.ietf.org/rfc/rfc2183.txt).
jean-max Reymond, can you change the GetFile script to provide correct "attachment" disposition or use "inline" there? If you will not have any luck, can you also provide scripts and STR to reproduce the server deployment locally?
Flags: needinfo?(ydelendik) → needinfo?(jmreymond)
Reporter | ||
Comment 3•9 years ago
|
||
OK, I will try but what's wrong with RFC 5987 ?
https://tools.ietf.org/html/rfc5987
some extracts from the section "3.2.2 examples":
Extended notation, using the Unicode characters U+00A3 (POUND SIGN)
and U+20AC (EURO SIGN):
foo: bar; title*=UTF-8''%c2%a3%20and%20%e2%82%ac%20rates
Flags: needinfo?(jmreymond)
Comment 4•9 years ago
|
||
> OK, I will try but what's wrong with RFC 5987 ?
There is a misspelled "attachment" disposition keyword (server reports it as "attachement").
Updated•9 years ago
|
Whiteboard: [pdfjs-c-integration][pdfjs-d-printing]
Updated•9 years ago
|
Whiteboard: [pdfjs-c-integration][pdfjs-d-printing] → [pdfjs-c-integration]
Reporter | ||
Comment 5•9 years ago
|
||
thanks a lot. Replace attachement (!!!) by inline and all is OK
Strange that debugger displays a 200 return code, 500 seems more accurate.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•