You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "David Neuman (JIRA)" <ji...@apache.org> on 2016/11/10 20:39:58 UTC

[jira] [Created] (TC-38) Content type sometimes incorrect on Riak PUT

David Neuman created TC-38:
------------------------------

             Summary: 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)