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

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

GitHub user dneuman64 opened a pull request:

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

    TC-38 - Traffic Ops now always sends correct Content-Type header on Riak PUT

    Changed the Riak Adapter to set the Content-Type as part of the request 
instead of using default_header.  This fixes 
[TC-38](https://issues.apache.org/jira/browse/TC-38).

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

    $ git pull https://github.com/dneuman64/incubator-trafficcontrol TC-38

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

    https://github.com/apache/incubator-trafficcontrol/pull/69.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 #69
    
----
commit 23c7dd9f5f1eb446496c033c328b385cbe031de3
Author: Dave Neuman <[email protected]>
Date:   2016-11-10T20:58:12Z

    send Content-Type in PUT request instead of using default_header

----


> Content type sometimes incorrect on Riak PUT
> --------------------------------------------
>
>                 Key: TC-38
>                 URL: https://issues.apache.org/jira/browse/TC-38
>             Project: Traffic Control
>          Issue Type: Bug
>          Components: Traffic Ops
>    Affects Versions: 1.70
>            Reporter: David Neuman
>            Assignee: David Neuman
>             Fix For: 2.0.1
>
>
> From a slack converstation:
> pengywu       [23:46]  
> @neuman 
>    I Created an HTTPS Delivery Service base on R1.7 , but can't get 
> certificate for ops API : api/1.2/cdns/name/kabletown_cdn/sslkeys.json.
> The root cause :when ops putting the data into Vault, the Content-Type showed 
> to be "application/x-www-form-urlencoded " which supposed to be 
> "application/json".
> THe $ua->default_header( 'Content-Type' => $content_type ) looks  is 
> overidden with "application/x-www-form-urlencoded" when doing a PUT request.
> I  workaround by chang the code in  
> traffic_ops/app/lib/Connection/RiakAdapter.pm  line 105:
>    return $ua->put( $fqdn, Content => $value, 'Content-Type'=>$content_type );
> ...
> You can also read this link which  describes the same problem. 
> http://www.nntp.perl.org/group/perl.libwww/2015/05/msg7727.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to