Fortinet white logo
Fortinet white logo

Script Reference Guide

HTTP:close()

HTTP:close()

Close an HTTP connection using code 503.

Can support multiple close calls.

Syntax

HTTP:close();

Arguments

N/A

Events

Applicable in the following events:

  • HTTP_REQUEST

  • HTTP_RESPONSE

Example

when HTTP_REQUEST {
Example1:
HTTP:close in script 1
HTTP:close in script 2
ps: it will send the close message to client correctly
Example2:
HTTP:close()
HTTP:redirect_with_cookie("www.example.com","server=nginx")
ps:the client get the redirect message, the close message is overwritten
HTTP:close()               --close http connection using code 503

Supported Version

FortiADC version 4.6.x and later.

HTTP:close()

HTTP:close()

Close an HTTP connection using code 503.

Can support multiple close calls.

Syntax

HTTP:close();

Arguments

N/A

Events

Applicable in the following events:

  • HTTP_REQUEST

  • HTTP_RESPONSE

Example

when HTTP_REQUEST {
Example1:
HTTP:close in script 1
HTTP:close in script 2
ps: it will send the close message to client correctly
Example2:
HTTP:close()
HTTP:redirect_with_cookie("www.example.com","server=nginx")
ps:the client get the redirect message, the close message is overwritten
HTTP:close()               --close http connection using code 503

Supported Version

FortiADC version 4.6.x and later.