Print Download PDF Send Feedback

Previous

Next

Configuring Additional HTTPS Status Code, which ICAP Client Sends in RESPMOD

Description

To send HTTP server response to an ICAP server in RESPMOD, you can configure HTTP server status codes that the ICAP Client sends to the ICAP server.

By default, the ICAP Client sends server status codes 1xx or 2xx.

To configure the HTTP server status codes

You add the HTTP server status codes as values of the specific kernel parameter:

Item

Description

Name

icap_append_status_code_str

Type

String

Notes

  • Length of each added server status code is from 1 to 3 characters
  • Accepted string values are:
    • '<Single Digit N>' - ICAP Client sends all status codes Nyz that start with the specified digit N (for example, if you set the value to '3', the ICAP Client sends status codes 3yz)
    • '<Two Digits NN>' - ICAP Client sends all status codes NNz that start with the specified two digits N (for example, if you set the value to '30', the ICAP Client sends status codes 30z)
    • '<Three Digits NNN>' - ICAP Client sends the specified status code NNN (for example, if you set the value to '304', the ICAP Client sends the status code 304)
  • You can add up to 10 server status codes

For general instructions, see Working with Kernel Parameters on Security Gateway.

To see the list of the configured HTTP server status codes

  1. Set the value of this kernel parameter to the string '__print__':

    # fw ctl set str icap_append_status_code_str '__print__'

  2. Print the list of the configured server status codes:

    # dmesg | grep icap_client_append_status_code

Example:

[Expert@GW:0]# fw ctl set str icap_append_status_code_str '__print__'
[Expert@GW:0]# dmesg | grep icap_client_append_status_code
[fw6_0];icap_client_append_status_code: ==> new 'status code' array is: [ 1 ; 2 ;]
[fw4_0];icap_client_append_status_code: ==> new 'status code' array is: [ 1 ; 2 ;]
[Expert@GW:0]#

To add an HTTP server status code temporarily

  1. Set the value of this kernel parameter to the desired string (see the Notes above):
    • # fw ctl set str icap_append_status_code_str 'N'
    • # fw ctl set str icap_append_status_code_str 'NN'
    • # fw ctl set str icap_append_status_code_str 'NNN'
  2. Print the list of the configured server status codes:

    # fw ctl set str icap_append_status_code_str '__print__'

    # dmesg | grep icap_client_append_status_code

Example:

[Expert@GW:0]# fw ctl set str icap_append_status_code_str '3'
[Expert@GW:0]# fw ctl set str icap_append_status_code_str '__print__'
[Expert@GW:0]# dmesg | grep icap_client_append_status_code
[fw6_0];icap_client_append_status_code: ==> new 'status code' array is: [ 1 ; 2 ; 3 ;]
[fw4_0];icap_client_append_status_code: ==> new 'status code' array is: [ 1 ; 2 ; 3 ;]
[Expert@GW:0]#

To delete all configured HTTP server status codes temporarily

  1. Set the value of this kernel parameter to an empty string '':

    # fw ctl set str icap_append_status_code_str ''

  2. Print the list of the configured HTTP headers:

    # fw ctl set str icap_append_status_code_str '__print__'

    # dmesg | grep icap_client_append_status_code

Example:

[Expert@GW:0]# fw ctl set str icap_append_status_code_str ''
[Expert@GW:0]# fw ctl set str icap_append_status_code_str '__print__'
[Expert@GW:0]# dmesg | grep icap_client_append_status_code
[Expert@GW:0]#

To restore the default configured HTTP server status codes temporarily

  1. Set the value of this kernel parameter to the strings '1' and '2':
    1. # fw ctl set str icap_append_status_code_str '1'
    2. # fw ctl set str icap_append_status_code_str '2'
  2. Print the list of the configured server status codes:

    # fw ctl set str icap_append_status_code_str '__print__'

    # dmesg | grep icap_client_append_status_code