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

David H Nebinger, geändert vor 8 Monaten. New Member Beiträge: 4 Beitrittsdatum: 18.09.23 Neueste Beiträge

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, geändert vor 8 Monaten. Liferay Legend Beiträge: 14933 Beitrittsdatum: 02.09.06 Neueste Beiträge

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, geändert vor 8 Monaten. New Member Beiträge: 4 Beitrittsdatum: 18.09.23 Neueste Beiträge

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, geändert vor 8 Monaten. Liferay Legend Beiträge: 14933 Beitrittsdatum: 02.09.06 Neueste Beiträge

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, geändert vor 7 Monaten. New Member Beiträge: 4 Beitrittsdatum: 18.09.23 Neueste Beiträge

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!