Http response api reference, Overview, Limitation of the content rewrite – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual
Page 75: Methods, Os_http_response::code, Chapter 6

Brocade Virtual ADX OpenScript API Guide
63
53-1003243-01
Chapter
6
HTTP RESPONSE API reference
In this chapter
This chapter contains the following sections:
•
•
Overview
The OS_HTTP_RESPONSE module includes the APIs to retrieve or set the value of the fields in the
current HTTP response headers. These APIs can only be called from the HTTP_RESPONSE event.
The use
package to be used.
For example: to use the OS_HTTP_RESPONSE methods, The OS_HTTP_RESPONSE package must
be declared as follows:
use OS_HTTP_RESPONSE;
Limitation of the content rewrite
The maximum number of the HTTP header rewrite entries is 29. If there is a pattern to be deleted
that spans multiple packets (i.e. two packets), it will be considered as two rewrite actions. When
the total number of rewrites exceed 29, the TCP connection may fail or the content rewrite action
exceeding the limit may fail. The maximum header rewrite entry size cannot exceed the TCP MSS
(Maximum Segment Size).
Also for header insertion, the maximum length of a header name is 128 bytes and the maximum
length of a header value is 512 bytes. When combined together the sum of the header name and
header values cannot exceed 512 bytes.
Methods
OS_HTTP_RESPONSE::code
Returns the status code specified in the HTTP response header if it exists otherwise it returns
NULL.
Context
This function called in http request context will have no effect.