---
title: "Client control of the header Content-Disposition for files in the session cache"
slug: "api/basket/image-generation/client-control-of-the-header-content-disposition-for-files-in-the-session-cache"
sidebar:
  order: 533
---

<a id="ref-8b3470f93b0b"></a>
<a id="ref-ff2a1af8f0eb"></a>
<a id="ref-14c14940e62e"></a>
<a id="ref-1e4595aa562c"></a>

Added mechanism to HTTP server that allows HTTP client to control `Content`-`Disposition` response header for GET requests referencing files in the session cache.

To add a `Content-Disposition` response header, the client must pass a URL with a query component that contains a `contentDisposition` parameter and an optional `filename` parameter. The value of the `contentDisposition` parameter must be either `inline` or `attachment`.

The `filename` parameter is ignored if its value contains a C0 (U+0000 to U+001F) or C1 (U+0080 to U+009F) control character, DELETE (U+007F), or a forward (U+002F) or backward (U+005C) slash. All other characters are allowed, even if they result in an invalid filename on the client system.

Furthermore, for the filename *not* to be ignored, both the `filename` specified by the filename query parameter and the actual filename must have an extension, and both extensions must be equal, or the mapping to a content type must produce the same result, which in turn must be different from `application/octet-stream.`

The mechanism is intended for use with URLs returned by operations [`getGeneratedImage`](/pCon/configuratorOnline/specs/api/basket/operations/getgeneratedimage#ref-01360c8648c1) and [`getExportedGeometry`](/pCon/configuratorOnline/specs/api/basket/operations/getexportedgeometry#ref-0862014d3e84) of the basket web service. The behavior (whether or not a `Content-Disposition` response header is produced) is undefined if it is used with other URLs.

The `contentDisposition` and filename query parameters must be encoded according to `application/x-www-form-urlencoded` as specified in Section 5.2, *application/x-www-form-urlencoded* serializing, of the [WHATWG URL specification](https://url.spec.whatwg.org/).

The `filename` parameter of the `Content-Disposition` response header field is encoded according to RFC 6266. `filename=` is used for filenames consisting entirely of code points less than U+0100, `filename*=` for all other filenames. UTF-8 is used as the encoding for `filename*=.`
