Skip to content

Bug: Chunked request will timeout #421

@gh-orange

Description

@gh-orange

Tinyproxy version

1.11.0

Issue

  • what am I doing
    I found this bug when connect to Subversion server via tinyproxy to get repository information.
    First I configure the Subversion client proxy to port 8888 in the file C:\Users\Administrator\AppData\Roaming\Subversion\servers

    http-proxy-host = 127.0.0.1
    http-proxy-port = 8888

    then I execute the command

    svn info "http://x.x.x.x/repositoryName"
    

    It send an HTTP request like

    OPTIONS http://x.x.x.x/repositoryName HTTP/1.1
    Host: x.x.x.x
    Authorization: Basic eaQuZ4d5O1peczZ2Nzg6ATK=
    User-Agent: SVN/1.14.1 (x86-microsoft-windows) serf/1.3.9
    Accept-Encoding: gzip
    DAV: http://subversion.tigris.org/xmlns/dav/svn/depth
    DAV: http://subversion.tigris.org/xmlns/dav/svn/mergeinfo
    DAV: http://subversion.tigris.org/xmlns/dav/svn/log-revprops
    Transfer-Encoding: chunked
    
    <?xml version="1.0" encoding="utf-8"?><D:options xmlns:D="DAV:" />
    

    So I also tried to send this packet with curl again after timeout failure.

    echo '<?xml version="1.0" encoding="utf-8"?><D:options xmlns:D="DAV:" />' | curl -v -x http://127.0.0.1:8888 -X OPTIONS  -H "Authorization:Basic eaQuZ4d5O1peczZ2Nzg6ATK=" -A "SVN/1.14.1 (x86-microsoft-windows) serf/1.3.9" -H "Accept-Encoding:gzip" -H "Content-Type:" -H "Accept:" -H "DAV:http://subversion.tigris.org/xmlns/dav/svn/depth" -H "DAV:http://subversion.tigris.org/xmlns/dav/svn/mergeinfo" -H "DAV:http://subversion.tigris.org/xmlns/dav/svn/log-revprops" -H "Transfer-Encoding:chunked" -d @- "http://x.x.x.x/repositoryName"

    Also failed. However, if I remove the header Transfer-Encoding:chunked it works!

  • what I expect
    normal response

    HTTP/1.1 200 OK
    Via: 1.1 034bfb8694ea (tinyproxy/1.11.0)
    Date: Sat, 12 Feb 2022 09:04:05 GMT
    Server: Apache/2.4.35 (Unix)
    DAV: 1,2
    MS-Author-Via: DAV
    Allow: OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,PUT,LOCK,UNLOCK,CHECKOUT
    Content-Length: 0
    Content-Type: application/vnd.ms-excel.sheet.macroenabled.12
    
  • what I really got
    timeout response

    HTTP/1.1 408 Request Timeout
    Via: 1.1 034bfb8694ea (tinyproxy/1.11.0)
    Content-Type: text/html; charset=iso-8859-1
    Server: Apache/2.4.35 (Unix)
    Content-Length: 295
    Date: Sat, 12 Feb 2022 08:56:51 GMT
    
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>408 Request Timeout</title>
    </head><body>
    <h1>Request Timeout</h1>
    <p>Server timeout waiting for the HTTP request from the client.</p>
    <hr>
    <address>Apache/2.4.35 (Unix) Server at x.x.x.x Port 80</address>
    </body></html>
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions