Project

General

Profile

Feature #764

Add new endpoint configuration option "formatDispositions" to control the Content-Disposition specific for each

Added by Chad Trabant about 8 years ago. Updated about 8 years ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Start date:
01/13/2016
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

Add a new endpoint configuration option formatDispositions that is set to a list of format keys and associated HTTP content disposition header values.

This should be an optional parameter, if any format keys specified in the formatTypes do not have a corresponding entry in formatDispositions the behavior should fall back to the current behavior of generating a Content-Disposition header.

The header values may include a small list of simple substitutions.

The configuration option is conceived as:

<endpoint>.formatDispositions = \
  key: value, \
  key: value

where the keys should match those specified in formatTypes, i.e. the values specified by the client using the format parameter.

A fully formed example may look like:

query.formatDispositions = \
  miniseed: attachment; filename="a_miniseed_file.mseed", \
  text: inline; filename="%A_%U.txt" 

Using the above, when the client specifies format=miniseed the server response will contain the following HTTP header:

Content-Disposition: attachment; filename="a_miniseed_file.mseed" 

The simple substitutions in the value strings should be performed as follows:

key replacement
%A Application name (appName config value) e.g. fdsnws-dataselect
%U UTC date-time as YYY-MM-DDThh:mm:ssZ e.g. 2016-01-14T00:18:01Z

History

#1 Updated by Mike Stults about 8 years ago

  • Resolution set to Fixed

The formatDispositions is implemented and ready to test.
- One variation, instead of %A and %U for substitution strings at runtime, the alternative syntax ${appName} and ${UTC} were implemented instead.

Also available in: Atom PDF