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

David H Nebinger, modificado 8 Meses atrás. New Member Postagens: 4 Data de Entrada: 18/09/23 Postagens Recentes

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, modificado 8 Meses atrás. Liferay Legend Postagens: 14933 Data de Entrada: 02/09/06 Postagens Recentes

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, modificado 8 Meses atrás. New Member Postagens: 4 Data de Entrada: 18/09/23 Postagens Recentes

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, modificado 8 Meses atrás. Liferay Legend Postagens: 14933 Data de Entrada: 02/09/06 Postagens Recentes

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, modificado 8 Meses atrás. New Member Postagens: 4 Data de Entrada: 18/09/23 Postagens Recentes

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!