.. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. include:: ../../../common.defs .. _developer-plugins-http-headers-marshal-buffers: Marshal Buffers *************** A *marshal buffer*, or ``TSMBuffer``, is a heap data structure that stores parsed URLs, MIME headers, and HTTP headers. You can allocate new objects out of marshal buffers and change the values within a marshal buffer. Whenever you manipulate an object, you require the handle to the object (``TSMLoc``) and the marshal buffer containing the object (``TSMBuffer``). Routines exist for manipulating the object based on these two pieces of information. For examples, see one of the following: - :ref:`developer-plugins-http-headers` - :ref:`developer-plugins-http-headers-urls` - :ref:`developer-plugins-http-headers-mime-headers` The **marshal buffer functions** enable you to create and destroy Traffic Server's marshal buffers, which are the data structures that hold parsed URLs, MIME headers, and HTTP headers. .. caution:: Any marshal buffer fetched by ``TSHttpTxn*Get`` will be used by other parts of the system. Be careful not to destroy these shared transaction marshal buffers in functions such as those below: - `TSHttpTxnCachedReqGet `_ - `TSHttpTxnCachedRespGet `_ - `TSHttpTxnClientReqGet `_ - `TSHttpTxnClientRespGet `_ - `TSHttpTxnServerReqGet `_ - `TSHttpTxnServerRespGet `_ - `TSHttpTxnTransformRespGet `_