Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-20329

Malformed URL should return a 400 status code rather than a 500

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • 14.4.6
    • URLs
    • None
    • Unknown

    Description

      If a client sends a bad request in the form a malformed URL it would make more sense for it to receive a 400 status code rather than a 500.
      At the moment this type of malformed URLs could also generate clutter in the logs in certain scenarios.

      Steps to reproduce:
      Make the following curl request:

       
      curl https://www.xwiki.org/xwiki/bin/login/XWiki/XWikiLogin?xredirect=%2Fxwiki%2Fbin%2Fview%2FMain%2FWebHome\" 
      

      Expected behavior:
      Receive a 400 status code

      Actual result:
      Receive a status code of 500

      Attachments

        Activity

          People

            Unassigned Unassigned
            ppantiru Paul Pantiru
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: