Opened 9 years ago

Closed 8 years ago

#1928 closed defect (fixed)

Metrics website has random bytes added after </html> in Chrome

Reported by: karsten Owned by: phobos
Priority: Low Milestone:
Component: Metrics/Website Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When looking at the Metrics website in Chrome, there are seemingly random bytes added at the end of the page. These bytes are outside the </html> tag. Not sure if this is a Chrome problem or has to do with the current Apache HTTP Server and Tomcat setup. Reported by mwenge.

Child Tickets

Change History (13)

comment:1 Changed 9 years ago by karsten

Priority: normalminor

Andrew says:

I think this is a chrome problem misunderstanding content-length or getting more than it expects from metrics. I see it too, but haven't had time to debug it.

I'm not too excited to debug Chrome problems. If we think it's a Chrome bug, let's ignore this and close the bug. Not the end of the world. I'm changing priority to minor in case someone is curious enough to debug it.

comment:2 Changed 9 years ago by phobos

According to Chrome Dev tools, you have a stray quote mark between the last </div> and </body> elements.

comment:3 Changed 9 years ago by phobos

Owner: changed from phobos to karsten
Status: newassigned

comment:4 Changed 9 years ago by karsten

Owner: changed from karsten to phobos

I think this problem is related to Tomcat compressing responses that are at least 2 KiB in size.

Requesting the 1006 bytes large extra-info descriptor

http://metrics.torproject.org/extrainfodesc?desc-id=bf015e24

doesn't have random bytes at the end, but the 2328 bytes large extra-info descriptor

http://metrics.torproject.org/extrainfodesc?desc-id=d96fc846

has them. I confirmed this observation with other pages, too.

Can we turn off compression in Tomcat's configuration?

comment:5 Changed 9 years ago by karsten

Component: WebsiteMetrics

Andrew, can we turn off compression in Tomcat's configuration?

comment:6 Changed 9 years ago by karsten

Andrew?

comment:7 Changed 9 years ago by phobos

tomcat compression isn't on. apache is the front end to tomcat, and this still occurs. Giving up.

comment:8 in reply to:  7 Changed 9 years ago by karsten

Replying to phobos:

tomcat compression isn't on. apache is the front end to tomcat, and this still occurs. Giving up.

Are you sure compression isn't on? Here's a (possibly outdated) snippet from Tomcat's configuration:

<Connector port="8080" maxHttpHeaderSize="8192"
           maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
           enableLookups="false" redirectPort="8443" acceptCount="100"
           connectionTimeout="20000" disableUploadTimeout="true"
           compression="on" compressionMinSize="2048"
           noCompressionUserAgents="gozilla, traviata"
           compressableMimeType="text/html,text/xml,text/plain" />

comment:9 Changed 8 years ago by karsten

Component: MetricsMetrics Website

comment:10 Changed 8 years ago by phobos

tomcat compression is now off.

comment:11 Changed 8 years ago by phobos

confirmed apache is still doing gzip encoding.

comment:12 Changed 8 years ago by karsten

Solves the problem for me! Can someone confirm?

comment:13 Changed 8 years ago by karsten

Resolution: fixed
Status: assignedclosed

Confirmed by rransom. I'd say this is fixed now. Thanks, phobos! Closing.

Note: See TracTickets for help on using tickets.