一部のポータル URL での HTTP 400 Bad Request エラー
written-by
Jorge García Jiménez
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
legacy-article
learn-legacy-article-disclaimer-text
ご覧のページは、お客様の利便性のために一部機械翻訳されています。また、ドキュメントは頻繁に更新が加えられており、翻訳は未完成の部分が含まれることをご了承ください。最新情報は都度公開されておりますため、必ず英語版をご参照ください。翻訳に問題がある場合は、こちら までご連絡ください。
問題
ポータルからの URL で http 400 の不正な要求エラーが発生することがあります。
たとえば、ユーザーを編集すると、不正なリクエストが表示されます。
Tomcat アクセス ログで、400 リクエストを確認できます。
- | 10.172.2.11 | [10/May/2021:09:12:21 +0000] | GET | "/group/control_panel/manage" | "?p_p_id=com_liferay_users_admin_web_portlet_UsersAdminPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_com_liferay_users_admin_web_portlet_UsersAdminPortlet_mvcRenderCommandName=%2Fusers_admin%2Fedit_user&_com_liferay_users_admin_web_portlet_UsersAdminPortlet_backURL=https%3A%2F%2Fareaprivada.cofares.es%2Fgroup%2Fcontrol_panel%2Fmanage%3Fp_p_id%3Dcom_liferay_users_admin_web_portlet_UsersAdminPortlet%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_toolbarItem%3Dview-all-users%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_usersListView%3Dflat-users%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_cur2%3D1%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_delta2%3D20%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_keywords%3Doscibanez%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_status%3D0%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_emailAddress%3D%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_firstName%3D%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_lastName%3D%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_middleName%3D%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_organizationId%3D0%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_roleId%3D0%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_screenName%3D%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_userGroupId%3D0%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_orderByCol%3Dname%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_orderByType%3Dasc%26_com_liferay_users_admin_web_portlet_UsersAdminPortlet_navigation%3D&_com_liferay_users_admin_web_portlet_UsersAdminPortlet_p_u_i_d=278699800" | 400 | - | 0 | "null" | "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"
catalina.out では、次のトレースを確認できます。
10-May-2021 07:45:39.237 INFO [http-nio-8080-exec-133] org.apache.coyote.http11.AbstractHttp11Processor.process Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Request header is too large
Environment
TomcatにバンドルされたLiferay DXP 7.0
解決策
解決策は、Tomcat で maxHttpHeaderSize の値を増やすことです。
Tomcatのドキュメントによると:
maxHttpHeaderSize: 要求および応答 HTTP ヘッダーの最大サイズ (バイト単位で指定)。 指定しない場合、この属性は 8192 (8 KB) に設定されます。
maxHttpHeaderSize より高い値に設定します。次に例を示します。
maxHttpHeaderSize="65536"
did-this-article-resolve-your-issue