title: Proxy error in iOS Objective-C
body: <p>Hi I am working on a frame work. I am using NSURLProtocol to interceptor the request. In the request I am adding proxy with Username and password.</p>
  
  <p>its perfectly working in the curl
  - curl proxy with username and paswword..</p>
  
  <p>when I am changing the header in the request, In the response I am getting this error. </p>
  
  <p>Request failed: unacceptable content-type: text/html"</p>
  
  <p>code which I am using </p>
  
  <pre><code>-(void)startLoading {
          NSMutableURLRequest *newRequest = [self.request mutableCopy];
       NSURLSessionConfiguration* config = NSURLSessionConfiguration.defaultSessionConfiguration;
             // config.HTTPAdditionalHeaders = @{ @"Accept":@"application/json"};
              NSDictionary *proxyDict = [self getProxyDictionary];
              if (proxyDict.allKeys.count &gt;= 1){
                  config.connectionProxyDictionary = proxyDict;
  
       NSString *authorizationToken = ["username" stringByAppendingString:@":"] stringByAppendingString: "password"];
  config.HTTPAdditionalHeaders = @{@"Accept": @"application/json",@"Proxy-Authorization":authorizationToken};
              }
      }
  </code></pre>
  
  <p>If I run in the webview, I am getting this error </p>
  
  <pre><code>TypeError: must start with number, buffer, array or string
   
   at fromObject (buffer.js:138:11)
     at new Buffer (buffer.js:65:10)
     at module.exports (/apps/infinity/freeg-proxy/trans-proxy/app/http/authenticator.js:12:19)
     at call (/apps/infinity/freeg-proxy/trans-proxy/node_modules/connect/index.js:239:7)
     at next (/apps/infinity/freeg-proxy/trans-proxy/node_modules/connect/index.js:183:5)
     at Function.handle (/apps/infinity/freeg-proxy/trans-proxy/node_modules/connect/index.js:186:3)
     at Server.app (/apps/infinity/freeg-proxy/trans-proxy/node_modules/connect/index.js:51:37)
     at emitTwo (events.js:87:13)`enter code here`
     at Server.emit (events.js:172:7)
     at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:528:12)
     at HTTPParser.parserOnHeadersComplete (_http_common.js:103:23)
  </code></pre>
  
  <p>Can any one help for me.</p>