Skip to content

Compress TSV exports#1314

Open
labkey-jeckels wants to merge 1 commit intorelease26.3-SNAPSHOTfrom
26.3_fb_tsvCompression
Open

Compress TSV exports#1314
labkey-jeckels wants to merge 1 commit intorelease26.3-SNAPSHOTfrom
26.3_fb_tsvCompression

Conversation

@labkey-jeckels
Copy link
Contributor

@labkey-jeckels labkey-jeckels commented Mar 20, 2026

Rationale

Spring Boot compresses many text HTTP responses by default. But not TSV.

Changes

  • Add text/tab-separated-values to the default set of compressed MIME types
  • Code review @labkey-matthewb
  • Manual test - confirm that HTML, JSON, JS, and TSV responses use gzip compression

put("server.compression.enabled", "true");
// Spring Boot compresses HTML, JSON and other types by default, but not TSV. We have to duplicate the
// defaults and add text/tab-separated-values
put("server.compression.mime-types", "text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml,text/tab-separated-values");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see one use of text/json in our code, but I don' think we're using that in responses.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think text/json is a valid mime-type. It should only be application/json according to RFC8259.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants