Hi all,
I've released an update to Web Connection with version 8.5. It's been a bit since the last release and there are a lot of small improvements and modernizations to some protocols included in this update.
I've posted a full release post with all the details of the updates here:
If you just want the cliff notes, here's the Changelog:
There are also updates to the Web Connection Documentation including a new dark theme and typography enhancements for easier readability on smaller screens, and the Web Connection Weblog has been re-homed with a new look as well.
Aloha,
+++ Rick ---
Hi Rick,
Thks for the update, I like the term modernization
Here is some code I need to implement to modernize wwRequest after users have reported abnormal behavior to me
* wwRequest logic assumes:
* GET = first load
* POST = user submitted form
* But in 2026, this assumption is no longer valid.
* Many tools send POST/OPTIONS before the user submits anything.
DEFINE CLASS jsRequest AS wwRequest
FUNCTION IsPostBack()
LOCAL lcMethod, lcDbg, lnContentLen
lcMethod = THIS.ServerVariables("REQUEST_METHOD")
lnContentLen = VAL(THIS.ServerVariables("CONTENT_LENGTH"))
* Ignore OPTIONS and HEAD, must be POST
IF lcMethod != "POST"
RETURN .F.
ENDIF
* Ignore empty POST (prefetch, adblock, antivirus)
IF lcMethod == "POST" AND lnContentLen = 0
RETURN .F.
ENDIF
RETURN .T.
ENDFUNC
FUNCTION IsRealGet()
LOCAL lcMethod, lcFetchMode
lcMethod = THIS.ServerVariables("REQUEST_METHOD")
lcFetchMode = LOWER(THIS.ServerVariables("HTTP_SEC_FETCH_MODE"))
* Must be GET
IF lcMethod != "GET"
RETURN .F.
ENDIF
* Must be a real navigation
IF lcFetchMode != "navigate"
RETURN .F.
ENDIF
RETURN .T.
ENDFUNC
ENDDEFINE
Marcel
I wouldn't override any existing methods - if you want different functionality create new methods in the overloaded class. Changing IsPostBack() to also check for content can break existing code - there are scenarios in forms where you won't have any data being posted back (empty and auto-submitted forms), and the main purpose of that particular method is for HTML form usage where you switch logic when the form is initially shown and posted.
+++ Rick ---
Yes I will remove the "Ignore empty POST" part, I didn't need it was a Claude Sonet proposition ...
I was able to reproduce 1 errors with IsPostBack() and tag manager window open in a payment redirection process Redirection executed a false POST ( OPTION method if a remember well ) and the basket was cleaned before the payment
Marcel