beautypg.com

Os_http_request::remove_header($name), Usage, Input parameters – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual

Page 65: Return values, Example, Context

background image

Brocade Virtual ADX OpenScript API Guide

53

53-1003243-01

Methods

5

Usage

Can be used to insert a header.

Input Parameters

The following table contains the input values.

Return Values

None

Example

OS_HTTP_REQUEST::remove_header($name)

Removes an HTTP header specified by $name. If such a header is not present, this function will
have no effect.

NOTE

This API will remove a header with the value specified for the $name variable (case insensitive). For
example, OS_HTTP_REQUEST::remove_header("X-Forwarded-For") will remove ONLY the first
occurrence of the header by that name (case-insensitive).

Context

This function called in http response context will have no effect.

Usage

Can be used to remove a header.

TABLE 50

Input Values

Name

Type

Description

$name

string

A string representing the name
of the HTTP header.

$value

string

A string representing the value
of the HTTP header.

use OS_HTTP_REQUEST;

sub HTTP_REQUEST{

OS_HTTP_REQUEST::push_header("X-forwarded-for", "brocade ADX");

}