Forum Discussion

Yozzer's avatar
Yozzer
Icon for Nimbostratus rankNimbostratus
Mar 21, 2017

Safari POST data

Hi

 

I’m seeing an issue with the way Safari POST data is handled using the [HTTP::payload] command which is different to the way its handled for Firefox and IE.

 

Im trying to limit the number of HTTP::collect commands i use on a VIP which has multiple irules as its prone to conflicts so i have used this command in the HTTP_REQUEST irule section:

 

set qrystring "[string tolower ?[HTTP::payload]]"

 

This works fine for IE and Firefox as the POST data is captured however for Safari it is empty. How can i capture this POST data without HTTP::collect? Is this a known issue?

 

Thanks

 

4 Replies

  • Yozzer's avatar
    Yozzer
    Icon for Nimbostratus rankNimbostratus

    No, as mentioned it's used in another irule on the VIP so need another way of seeing the POST data due to conflicts.

     

  • Hi,

     

    Did you try this irule alone on the vs?

     

    What is the problem? Safari or other irules?

     

    If the problem is that another irule already collect http data and release it, try to combine these irule into one.

     

  • try this irule:

    when HTTP_REQUEST {
    
      if {[HTTP::method] eq "POST"}{
         Trigger collection for up to 1MB of data
        if {[HTTP::header "Content-Length"] ne "" && [HTTP::header "Content-Length"] <= 1048576}{
          set content_length [HTTP::header "Content-Length"]
        } else {
            set content_length 1048576
        }
         Check if $content_length is not set to 0
        if { $content_length > 0} {
          HTTP::collect $content_length
        }
      }
    }
    when HTTP_REQUEST_DATA {
    set qrystring "[string tolower ?[HTTP::payload]]"
     log local0. "payload is [HTTP::payload]"
    }