Issue with the current default User-Agent used by lifreray portal

David H Nebinger, módosítva 8 hónap-val korábban New Member Bejegyzések: 4 Csatlakozás dátuma: 2023.09.18. Legújabb bejegyzések

Hello,

i ran into an issue as the current default user agent "Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv 11.0) like Gecko" defined in com.liferay.portal.http.internal.HttpImpl is blocked for fetching RSS feed at one of my sources.

A quick research showed, that this user agent represents Internet Explorer 11 on Windows 8.1, ​​​​​​​using the user agent sting "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0" works fine.

Maybe the default user agent should be updated to an actual user agent.

Best regards, Timo

thumbnail
David H Nebinger, módosítva 8 hónap-val korábban Liferay Legend Bejegyzések: 14933 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések

It only sets the default if you haven't set a user agent yourself.

You didn't provide any other context, but is this a possibility?

David H Nebinger, módosítva 8 hónap-val korábban New Member Bejegyzések: 4 Csatlakozás dátuma: 2023.09.18. Legújabb bejegyzések

Sorry, i didnt know about or find any place to set the an user-agent myself - where can i do this?

​​​​​​​My issue was solved by the rss feed source - they unblocked the user agent for me.

thumbnail
David H Nebinger, módosítva 8 hónap-val korábban Liferay Legend Bejegyzések: 14933 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések

I didn't know if you were calling the HttpImpl using custom code (where you would have been able to set the user agent) or leveraging an OOTB Liferay widget. Glad you got it resolved though!

David H Nebinger, módosítva 8 hónap-val korábban New Member Bejegyzések: 4 Csatlakozás dátuma: 2023.09.18. Legújabb bejegyzések

I just use the RSS Widget in a page and there the issue came up, no custom code - thats why i created this "bug report" as this might become a problem in the future when maybe more RSS publishers block this default user agent.

I was just curios and searched the source code for the user agent definition to provide helpful information.

Sorry for the confusion!