You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/08/08 16:23:01 UTC

[jira] [Commented] (TC-503) Traffic Ops ORT Fails with Chunked Encoding

    [ https://issues.apache.org/jira/browse/TC-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16118566#comment-16118566 ] 

ASF GitHub Bot commented on TC-503:
-----------------------------------

GitHub user rob05c opened a pull request:

    https://github.com/apache/incubator-trafficcontrol/pull/786

    Fix TO ORT for missing Content-Length, per RFC

    Content-Length MAY be omitted per HTTP/1.1 RFC 7230, and in fact MUST
    NOT be included with a 'Transfer-Encoding: Chunked' header, which MUST
    be accepted by clients.
    
    Fixes TC-503

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rob05c/incubator-trafficcontrol to-ortcontentlengthfix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafficcontrol/pull/786.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #786
    
----
commit a4815d639a46e72c8236077a28a29677c9f14c8a
Author: Robert Butts <ro...@gmail.com>
Date:   2017-08-08T16:21:00Z

    Fix TO ORT for missing Content-Length, per RFC
    
    Content-Length MAY be omitted per HTTP/1.1 RFC 7230, and in fact MUST
    NOT be included with a 'Transfer-Encoding: Chunked' header, which MUST
    be accepted by clients.
    
    Fixes TC-503

----


> Traffic Ops ORT Fails with Chunked Encoding
> -------------------------------------------
>
>                 Key: TC-503
>                 URL: https://issues.apache.org/jira/browse/TC-503
>             Project: Traffic Control
>          Issue Type: Bug
>          Components: Traffic Ops ORT
>            Reporter: Robert Butts
>            Assignee: Robert Butts
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> ORT fails if no 'Content-Length' header exists.
> Content-Length MAY be omitted per HTTP/1.1 RFC 7230, and in fact MUST NOT be included with a 'Transfer-Encoding: Chunked' header, which MUST be accepted by clients.
> So far, we've just been lucky Perl/Mojolicious Traffic Ops doesn't happen to send Chunked encodings to ORT. But the spec requires clients accept it, ORT is in violation of HTTP/1.1. 
> Further, the upcoming Golang Traffic Ops sends Chunked encoding, and there's no reasonable way in Go to prevent it. There's no HTTP-compliant way to instruct the server not to send Chunked encoding either, since clients are required to accept it. The right solution here is to fix ORT to accept Chunked encoding, without Content-Length.
> It appears ORT only refuses it as a safety check, and doesn't actually need it for anything. Should be a simple fix.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)