Skip to content

Commit b51ceca

Browse files
change to recognize edg/edge/edgA/edgios as ID of edge browser in user agent depending on the enviroment where edge is run
1 parent 4281ac9 commit b51ceca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/src/main/java/com/genexus/webpanels/HttpContextWeb.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public class HttpContextWeb extends HttpContext {
7171

7272
private static final Pattern MULTIMEDIA_GXI_GRID_PATTERN = Pattern.compile("(\\w+)(_\\d{4})$");
7373

74-
private static final Pattern EDGE_BROWSER_VERSION_REGEX = Pattern.compile(" Edge\\/([0-9]+)\\.",
74+
private static final Pattern EDGE_BROWSER_VERSION_REGEX = Pattern.compile(" Edg[\\w]{0,3}\\/([0-9]+)\\.",
7575
Pattern.CASE_INSENSITIVE);
7676
private static final String GXEVENT_PARM = "gxevent";
7777

@@ -661,7 +661,7 @@ public int getBrowserType() {
661661
String userAgent = request.getHeader("USER-AGENT");
662662

663663
if (userAgent != null) {
664-
if ((userAgent.indexOf("Edge")) != -1) {
664+
if ((userAgent.indexOf("Edg") ) != -1) {
665665
return BROWSER_EDGE;
666666
} else if (userAgent.toUpperCase().indexOf("CHROME") != -1) {
667667
return BROWSER_CHROME;

0 commit comments

Comments
 (0)