Skip to content

WebServer: 301 redirects get stuck #26431

@jekader

Description

@jekader

Issue:
301 redirects served by the WebServer get stuck

Reproducer:

  1. cretate a directory under the web root # mkdir /var/www/1
  2. start WebServer # WebServer
  3. open the path curl -v http://127.0.0.1:8000/1 (or open it in the browser)
  4. notice the 301 redirect to from /1 to /1/ happening

Actual result:
Connection gets stuck on the client while the server logs it and considers the request as completed.

Expected result:
Connection terminates as it should and the client can start connecting to the redirected path.

Probable cause:
Looking at verbose curl output (-vvv) I see this note:
HTTP 1.0, assume close after body
However, there seems to be no body sent, just a line break. Sending anything after the line break should fix this as it will be considered as the body per RFC-2616

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions