Forum Discussion
Dave_Kelly_2025
Feb 19, 2009Nimbostratus
OK, I have fixed this with the following iRule. I am not sure why we need to de-chunk the HTTP_REQUEST. Can anyone tell me? I tried it with that part commented out, and it worked fine as well, so I'm guessing it's a request size issue...I suspect that the .IQY files being sent by Sharepoint wouldn't be affected by it, but who knows. At any rate, it's in there, but you might be able to comment it out for this case.
when HTTP_REQUEST {
Don't allow data to be chunked
if { [HTTP::version] eq "1.1" } {
if { [HTTP::header is_keepalive] } {
HTTP::header replace "Connection" "Keep-Alive"
}
HTTP::version "1.0"
}
}
when HTTP_RESPONSE {
Only check responses that are a text/x-ms-iqy content type
if { [HTTP::header "Content-Type"] starts_with "text/x-ms-iqy" } {
Get the content length so we can request the data to be
processed in the HTTP_RESPONSE_DATA event.
if { [HTTP::header exists "Content-Length"] } {
set content_length [HTTP::header "Content-Length"]
} else {
set content_length 1000000000
}
if { $content_length > 0 } {
HTTP::collect $content_length
}
}
}
when HTTP_RESPONSE_DATA {
Here you define what you want to find in the payload
set find "SharePointApplication=http://"
And here's what you'll be replacing it with
set replace "SharePointApplication=https://"
set payload [HTTP::payload]
Run the regsub to make all the replacements (add -nocase for case insensitivity)
if {[regsub -all $find $payload $replace new_response] > 0} {
HTTP::payload replace 0 [HTTP::payload length] $new_response
}
}