Forum Discussion
Sublimeboss31_3
Nimbostratus
Apr 22, 2019javascript fails with var is undefined
We use F5 with several upstream servers without SSL termination, and after our application update we faced some strange issues with undefined variables and pending xhr requests. Is there some advices...
dennypayne
Employee
Jun 21, 2006Try using the CLIENT_ACCEPTED event that I used earlier to limit the addition of a record to the first connection.
Also because you aren't setting $uid in the HTTP_RESPONSE event, I don't think anything's getting added, and you're seeing the log from the HTTP_REQUEST event.
I don't think order matters, but it might make it easier to see the logic if you move the response event before the request event, since it's on the first response that you want to set the persist record.
when CLIENT_ACCEPTED {
set add_persist 1
when HTTP_RESPONSE {
set uid [findstr [HTTP::uri] "uid=" 5 "&"]
if { $uid != "" and $add_persist} {
log local0. "Adding persist value to table: $uid"
persist add uie $uid
set add_persist 0
}
when HTTP_REQUEST {
set fulluri [HTTP::uri]
set uid [findstr [HTTP::uri] "uid=" 5 "&"]
if { $uid != "" } {
log local0. "Using persist value uid: $uid | $fulluri"
persist uie $uid
} else {
log local0. "No uid found in HTTP REQUEST | $fulluri"
}
}
This still may not help with the fact that you said you have different clients using the same uid however.
Denny
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects